summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/attr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-19 23:29:14 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-19 23:29:14 +0000
commit7ec5043c2c64d376af9ddab5006d44f392870cbd (patch)
treedf7555e132f782846f795d62e621bfc186a65bc9 /clang/test/CodeGenCXX/attr.cpp
parent3e2bb702db78bda5efd3aac2b025b5084e71f812 (diff)
downloadbcm5719-llvm-7ec5043c2c64d376af9ddab5006d44f392870cbd.tar.gz
bcm5719-llvm-7ec5043c2c64d376af9ddab5006d44f392870cbd.zip
Change CodeGenModule to rely on the Module's symbol table instead of
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing requirement for mangled names, which should help C++ codegen times a little. Forces us to do string lookups instead of pointer lookups, which might hurt codegen times a little across the board. We'll see how it plays out. Removing the string-uniquing requirement implicitly fixes any bugs like PR6635 which arose from the fact that we had multiple uniquing tables for different kinds of identifiers. llvm-svn: 99012
Diffstat (limited to 'clang/test/CodeGenCXX/attr.cpp')
-rw-r--r--clang/test/CodeGenCXX/attr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/attr.cpp b/clang/test/CodeGenCXX/attr.cpp
index 4c781c62b29..d689a4fdf49 100644
--- a/clang/test/CodeGenCXX/attr.cpp
+++ b/clang/test/CodeGenCXX/attr.cpp
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
+// CHECK: @test2 = alias i32 ()* @_Z5test1v
+
// CHECK: define i32 @_Z3foov() nounwind align 1024
int foo() __attribute__((aligned(1024)));
int foo() { }
@@ -18,3 +20,9 @@ void C::bar2() { }
// CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) nounwind align 1024
void C::bar3() { }
+
+// PR6635
+// CHECK: define i32 @_Z5test1v()
+int test1() { return 10; }
+// CHECK at top of file
+extern "C" int test2() __attribute__((alias("_Z5test1v")));
OpenPOWER on IntegriCloud