[PATCH] SymbolRewriter: introduce the SymbolRewriter pass

Jim Grosbach grosbach at apple.com
Fri Nov 7 12:39:00 PST 2014


Looking much improved. A few questions, but in general I think this is fine.

================
Comment at: include/llvm/IR/Module.h:373
@@ -372,3 +372,3 @@
   /// types are not returned.
-  const GlobalVariable *getGlobalVariable(StringRef Name,
-                                          bool AllowInternal = false) const {
+  GlobalVariable *getGlobalVariable(StringRef Name) const {
+    return getGlobalVariable(Name, false);
----------------
This drops the const-ness of the return value. Do we need to do that?

================
Comment at: include/llvm/Transforms/Utils/SymbolRewriter.h:50
@@ +49,3 @@
+
+namespace SymbolRewriter {
+/// The basic entity representing a rewrite operation.  It serves as the base
----------------
Since the pass factory and the parser take parameters via reference, is there any need to have the actual classes for the descriptors and such in the public header file? Those seem like implementation details which can be in the .cpp file.

http://reviews.llvm.org/D3161






More information about the llvm-commits mailing list