Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3e6c83de
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3e6c83de
编写于
5月 24, 2017
作者:
K
kennytm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compiletest: Force directive to be first complete word in header comment.
Refactored some related code to take advantage of this change.
上级
38ef8569
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
30 deletion
+34
-30
src/test/codegen/fastcall-inreg.rs
src/test/codegen/fastcall-inreg.rs
+1
-1
src/test/run-pass/i128-ffi.rs
src/test/run-pass/i128-ffi.rs
+2
-1
src/tools/compiletest/src/header.rs
src/tools/compiletest/src/header.rs
+31
-28
未找到文件。
src/test/codegen/fastcall-inreg.rs
浏览文件 @
3e6c83de
...
...
@@ -37,7 +37,7 @@
// ignore-tce
// ignore-thumb
// ignore-thumbeb
// ignore-x86_64
no-ignore-x86
// ignore-x86_64
// ignore-xcore
// ignore-nvptx
// ignore-nvptx64
...
...
src/test/run-pass/i128-ffi.rs
浏览文件 @
3e6c83de
...
...
@@ -15,7 +15,8 @@
// ignore-windows
// Ignore 32 bit targets:
// ignore-x86, ignore-arm
// ignore-x86
// ignore-arm
// ignore-emscripten
...
...
src/tools/compiletest/src/header.rs
浏览文件 @
3e6c83de
...
...
@@ -80,13 +80,12 @@ fn ignore_gdb(config: &Config, line: &str) -> bool {
return
false
;
}
if
!
line
.contains
(
"ignore-gdb-version"
)
&&
config
.parse_name_directive
(
line
,
"ignore-gdb"
)
{
if
config
.parse_name_directive
(
line
,
"ignore-gdb"
)
{
return
true
;
}
if
let
Some
(
actual_version
)
=
config
.gdb_version
{
if
line
.
contains
(
"min-gdb-version"
)
{
if
line
.
starts_with
(
"min-gdb-version"
)
{
let
(
start_ver
,
end_ver
)
=
extract_gdb_version_range
(
line
);
if
start_ver
!=
end_ver
{
...
...
@@ -95,7 +94,7 @@ fn ignore_gdb(config: &Config, line: &str) -> bool {
// Ignore if actual version is smaller the minimum required
// version
actual_version
<
start_ver
}
else
if
line
.
contains
(
"ignore-gdb-version"
)
{
}
else
if
line
.
starts_with
(
"ignore-gdb-version"
)
{
let
(
min_version
,
max_version
)
=
extract_gdb_version_range
(
line
);
if
max_version
<
min_version
{
...
...
@@ -119,20 +118,21 @@ fn ignore_gdb(config: &Config, line: &str) -> bool {
fn
extract_gdb_version_range
(
line
:
&
str
)
->
(
u32
,
u32
)
{
const
ERROR_MESSAGE
:
&
'static
str
=
"Malformed GDB version directive"
;
let
range_components
=
line
.split
(
' '
)
.flat_map
(|
word
|
word
.split
(
'-'
))
.filter
(|
word
|
word
.len
()
>
0
)
.skip_while
(|
word
|
extract_gdb_version
(
word
)
.is_none
())
.collect
::
<
Vec
<&
str
>>
();
let
range_components
=
line
.split
(
&
[
' '
,
'-'
][
..
])
.filter
(|
word
|
!
word
.is_empty
())
.map
(
extract_gdb_version
)
.skip_while
(
Option
::
is_none
)
.take
(
3
)
// 3 or more = invalid, so take at most 3.
.collect
::
<
Vec
<
Option
<
u32
>>>
();
match
range_components
.len
()
{
1
=>
{
let
v
=
extract_gdb_version
(
range_components
[
0
])
.unwrap
();
let
v
=
range_components
[
0
]
.unwrap
();
(
v
,
v
)
}
2
=>
{
let
v_min
=
extract_gdb_version
(
range_components
[
0
])
.unwrap
();
let
v_max
=
extract_gdb_version
(
range_components
[
1
])
.expect
(
ERROR_MESSAGE
);
let
v_min
=
range_components
[
0
]
.unwrap
();
let
v_max
=
range_components
[
1
]
.expect
(
ERROR_MESSAGE
);
(
v_min
,
v_max
)
}
_
=>
panic!
(
ERROR_MESSAGE
),
...
...
@@ -149,10 +149,10 @@ fn ignore_lldb(config: &Config, line: &str) -> bool {
}
if
let
Some
(
ref
actual_version
)
=
config
.lldb_version
{
if
line
.
contains
(
"min-lldb-version"
)
{
let
min_version
=
line
.trim
()
.split
(
' '
)
.
las
t
()
if
line
.
starts_with
(
"min-lldb-version"
)
{
let
min_version
=
line
.trim
_right
()
.
r
split
(
' '
)
.
nex
t
()
.expect
(
"Malformed lldb version directive"
);
// Ignore if actual version is smaller the minimum required
// version
...
...
@@ -167,10 +167,10 @@ fn ignore_lldb(config: &Config, line: &str) -> bool {
fn
ignore_llvm
(
config
:
&
Config
,
line
:
&
str
)
->
bool
{
if
let
Some
(
ref
actual_version
)
=
config
.llvm_version
{
if
line
.
contains
(
"min-llvm-version"
)
{
let
min_version
=
line
.trim
()
.split
(
' '
)
.
las
t
()
if
line
.
starts_with
(
"min-llvm-version"
)
{
let
min_version
=
line
.trim
_right
()
.
r
split
(
' '
)
.
nex
t
()
.expect
(
"Malformed llvm version directive"
);
// Ignore if actual version is smaller the minimum required
// version
...
...
@@ -413,14 +413,14 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut FnMut(&str)) {
None
=>
false
,
};
if
matches
{
it
(
&
ln
[
close_brace
+
1
..
]
);
it
(
ln
[(
close_brace
+
1
)
..
]
.trim_left
()
);
}
}
else
{
panic!
(
"malformed condition directive: expected `//[foo]`, found `{}`"
,
ln
)
}
}
else
if
ln
.starts_with
(
"//"
)
{
it
(
&
ln
[
2
..
]
);
it
(
ln
[
2
..
]
.trim_left
()
);
}
}
return
;
...
...
@@ -528,15 +528,18 @@ fn parse_pp_exact(&self, line: &str, testfile: &Path) -> Option<PathBuf> {
}
fn
parse_name_directive
(
&
self
,
line
:
&
str
,
directive
:
&
str
)
->
bool
{
// This 'no-' rule is a quick hack to allow pretty-expanded and
// no-pretty-expanded to coexist
line
.contains
(
directive
)
&&
!
line
.contains
(
&
(
"no-"
.to_owned
()
+
directive
))
// Ensure the directive is a whole word. Do not match "ignore-x86" when
// the line says "ignore-x86_64".
line
.starts_with
(
directive
)
&&
match
line
.as_bytes
()
.get
(
directive
.len
())
{
None
|
Some
(
&
b
' '
)
|
Some
(
&
b
':'
)
=>
true
,
_
=>
false
}
}
pub
fn
parse_name_value_directive
(
&
self
,
line
:
&
str
,
directive
:
&
str
)
->
Option
<
String
>
{
let
keycolon
=
format!
(
"{}:"
,
directive
);
if
l
et
Some
(
colon
)
=
line
.find
(
&
keycolon
)
{
let
value
=
line
[(
colon
+
keycolon
.len
())
..
line
.len
()
]
.to_owned
();
let
colon
=
directive
.len
(
);
if
l
ine
.starts_with
(
directive
)
&&
line
.as_bytes
()
.get
(
colon
)
==
Some
(
&
b
':'
)
{
let
value
=
line
[(
colon
+
1
)
..
]
.to_owned
();
debug!
(
"{}: {}"
,
directive
,
value
);
Some
(
expand_variables
(
value
,
self
))
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录