This revision was automatically updated to reflect the committed changes.
jfb marked an inline comment as done.
Closed by commit rL346915: CGDecl::emitStoresForConstant fix synthesized
constant's name (authored by jfb, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
jfb marked an inline comment as done.
jfb added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:990-998
+ std::string Name = ("__const." + FunctionName(D.getParentFunctionOrMethod())
+
+ "." + D.getName())
+ .str();
+ llvm::Glob
jfb updated this revision to Diff 174090.
jfb added a comment.
- Inline the name creating, save a heap allocation.
Repository:
rC Clang
https://reviews.llvm.org/D54055
Files:
lib/CodeGen/CGDecl.cpp
test/CodeGen/decl.c
test/CodeGen/dump-struct-builtin.c
test/CodeGenCXX/amdgcn-string-l
dexonsmith added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:990-998
+ std::string Name = ("__const." + FunctionName(D.getParentFunctionOrMethod())
+
+ "." + D.getName())
+ .str();
+ llvm::GlobalVariable *InsertBefore = null
jfb added a comment.
Small update to use `std::string` because `Twine` lifetimes are sad. This
didn't trigger on any of the tests, but did in a stage2 build.
Repository:
rC Clang
https://reviews.llvm.org/D54055
___
cfe-commits mailing list
cfe-c
jfb updated this revision to Diff 174087.
jfb added a comment.
Herald added a subscriber: jkorous.
- Fix lifetime of the name, Twine bites again.
Repository:
rC Clang
https://reviews.llvm.org/D54055
Files:
lib/CodeGen/CGDecl.cpp
test/CodeGen/decl.c
test/CodeGen/dump-struct-builtin.c
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Seems reasonable to me.
Repository:
rC Clang
https://reviews.llvm.org/D54055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http: