diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-10 16:26:10 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-10 16:26:10 +0000 |
commit | ed33243e86f9e8212d73ca9cf0282e803295da5e (patch) | |
tree | bc9ca5345d170ca7fdb3d09a7417bb154ae23d06 /llvm | |
parent | dc352bb82b31251188b40201c30708976fe2c127 (diff) | |
download | bcm5719-llvm-ed33243e86f9e8212d73ca9cf0282e803295da5e.tar.gz bcm5719-llvm-ed33243e86f9e8212d73ca9cf0282e803295da5e.zip |
IR: Aliases don't belong to an explicit comdat
Aliases inherit their comdat from their aliasee, they don't have an
explicit comdat.
This fixes PR20279.
llvm-svn: 212732
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 5 | ||||
-rw-r--r-- | llvm/test/Feature/comdat.ll | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 87d26b164bb..a7499bc09b3 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -1528,11 +1528,6 @@ void AssemblyWriter::printAlias(const GlobalAlias *GA) { writeOperand(Aliasee, !isa<ConstantExpr>(Aliasee)); } - if (GA->hasComdat()) { - Out << ", comdat "; - PrintLLVMName(Out, GA->getComdat()->getName(), ComdatPrefix); - } - printInfoComment(*GA); Out << '\n'; } diff --git a/llvm/test/Feature/comdat.ll b/llvm/test/Feature/comdat.ll index 6b94a418582..05fb87c648e 100644 --- a/llvm/test/Feature/comdat.ll +++ b/llvm/test/Feature/comdat.ll @@ -9,6 +9,9 @@ $f2 = comdat any @v = global i32 0, comdat $f ; CHECK: @v = global i32 0, comdat $f +@a = alias i32* @v +; CHECK: @a = alias i32* @v{{$}} + define void @f() comdat $f { ret void } |