diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-30 22:51:54 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-30 22:51:54 +0000 |
| commit | 464fe024c53180caaf3a06a45409b04905c27c58 (patch) | |
| tree | b55d811630df41bf7e9050ee44064157455bdff9 /llvm/test/Transforms/Internalize | |
| parent | c5fe19d06265fcde822cd549d3c90d27c11e320e (diff) | |
| download | bcm5719-llvm-464fe024c53180caaf3a06a45409b04905c27c58.tar.gz bcm5719-llvm-464fe024c53180caaf3a06a45409b04905c27c58.zip | |
Use "weak alias" instead of "alias weak"
Before this patch we had
@a = weak global ...
but
@b = alias weak ...
The patch changes aliases to look more like global variables.
Looking at some really old code suggests that the reason was that the old
bison based parser had a reduction for alias linkages and another one for
global variable linkages. Putting the alias first avoided the reduce/reduce
conflict.
The days of the old .ll parser are long gone. The new one parses just "linkage"
and a later check is responsible for deciding if a linkage is valid in a
given context.
llvm-svn: 214355
Diffstat (limited to 'llvm/test/Transforms/Internalize')
| -rw-r--r-- | llvm/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/Internalize/local-visibility.ll | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll b/llvm/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll index 16bfe2a4609..16523886a06 100644 --- a/llvm/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll +++ b/llvm/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll @@ -4,10 +4,10 @@ ; CHECK: @A = internal global i32 0 @B = alias i32* @A -; CHECK: @B = alias internal i32* @A +; CHECK: @B = internal alias i32* @A @C = alias i32* @A -; CHECK: @C = alias internal i32* @A +; CHECK: @C = internal alias i32* @A define i32 @main() { %tmp = load i32* @C diff --git a/llvm/test/Transforms/Internalize/local-visibility.ll b/llvm/test/Transforms/Internalize/local-visibility.ll index c24d4b7f32a..b09a136e526 100644 --- a/llvm/test/Transforms/Internalize/local-visibility.ll +++ b/llvm/test/Transforms/Internalize/local-visibility.ll @@ -10,9 +10,9 @@ ; CHECK: @protected.variable = internal global i32 0 @protected.variable = protected global i32 0 -; CHECK: @hidden.alias = alias internal i32* @global +; CHECK: @hidden.alias = internal alias i32* @global @hidden.alias = hidden alias i32* @global -; CHECK: @protected.alias = alias internal i32* @global +; CHECK: @protected.alias = internal alias i32* @global @protected.alias = protected alias i32* @global ; CHECK: define internal void @hidden.function() { |

