summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/codegen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-11-02 22:28:50 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-11-02 22:28:50 +0000
commit1524e67feb5ad7fe9d6b42392929c1c6771cffab (patch)
tree6971f79755cf55a48ff3bf6ea94db84509de82ee /clang/test/Modules/Inputs/codegen
parentdce9def3dd56e71bceda335cb142e80084a82867 (diff)
downloadbcm5719-llvm-1524e67feb5ad7fe9d6b42392929c1c6771cffab.tar.gz
bcm5719-llvm-1524e67feb5ad7fe9d6b42392929c1c6771cffab.zip
Modular Codegen: Don't home always_inline functions
Since they'll likely (not always - if the address is taken, etc) be inlined away, even at -O0, separately provided weak definitions are likely to be unused so skip all of that. llvm-svn: 317279
Diffstat (limited to 'clang/test/Modules/Inputs/codegen')
-rw-r--r--clang/test/Modules/Inputs/codegen/foo.h3
-rw-r--r--clang/test/Modules/Inputs/codegen/use.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/codegen/foo.h b/clang/test/Modules/Inputs/codegen/foo.h
index bd3b6489e71..76ad6559cca 100644
--- a/clang/test/Modules/Inputs/codegen/foo.h
+++ b/clang/test/Modules/Inputs/codegen/foo.h
@@ -29,4 +29,7 @@ inline void inst_decl() {
inst<float>();
}
+__attribute__((always_inline)) inline void always_inl() {
+}
+
asm("narf");
diff --git a/clang/test/Modules/Inputs/codegen/use.cpp b/clang/test/Modules/Inputs/codegen/use.cpp
index cd1a4a642d0..3e551881f63 100644
--- a/clang/test/Modules/Inputs/codegen/use.cpp
+++ b/clang/test/Modules/Inputs/codegen/use.cpp
@@ -6,3 +6,6 @@ void non_modular_use_of_implicit_dtor() {
void use_of_instantiated_declaration_without_definition() {
inst<int>();
}
+void call_always_inline() {
+ always_inl();
+}
OpenPOWER on IntegriCloud