[PATCH] SymbolRewriter: introduce the SymbolRewriter pass

Saleem Abdulrasool abdulras at fb.com
Fri Nov 7 12:57:39 PST 2014


================
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);
----------------
grosbach wrote:
> This drops the const-ness of the return value. Do we need to do that?
Yes, in order to rename the Value.

================
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
----------------
grosbach wrote:
> 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.
Ah, I think I see what you mean, I can remove the concrete types from the header as only the iplist type information is needed.

http://reviews.llvm.org/D3161






More information about the llvm-commits mailing list