The final LGTM should probably wait for a C++ expert, but I agree this would
be really nice to have :-)
================
Comment at: test/CodeGenCXX/constexpr-available-externally.cpp:36
@@ +35,3 @@
+
+template struct tpl<int>;
+
----------------
Could you also add a testcase with a explicit template instantiation
declaration?
Please also add a test showing we don't emit a available_externally for a
member if just the class is used:
class foo {
static const int X = 1;
void bar();
}
void f(foo *x) {x->bar(); }
LGTM with that.
================
Comment at: test/CodeGenCXX/constexpr-available-externally.cpp:5
@@ +4,3 @@
+// CHECK: @_ZN6Object3fooE = available_externally constant %struct.Literal {
i32 1 }
+// CHECK: @_ZN6Object3barE = available_externally constant i32 42
+// CHECK: @_ZN3tplIiE4nposE = available_externally constant i32 -1
----------------
Can you move this closer to the code that causes it to be output? Maybe with
CHECK-DAG?
http://llvm-reviews.chandlerc.com/D1982
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits