[PATCH] D34993: Refine our --wrap implementation

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 12:43:46 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/SymbolTable.cpp:169
+  auto It = Symtab.find(CachedHashStringRef(Wrap->body()->getName()));
+  std::pair<unsigned, Symbol *> Foo =
+      std::make_pair<unsigned, Symbol *>(It->second.Idx, (Symbol *)Real);
----------------
Foo?


================
Comment at: ELF/SymbolTable.cpp:170
+  std::pair<unsigned, Symbol *> Foo =
+      std::make_pair<unsigned, Symbol *>(It->second.Idx, (Symbol *)Real);
+  WrapSymbols.push_back(Foo);
----------------
Real is already a Symbol*.


================
Comment at: ELF/SymbolTable.cpp:193-195
+  // __real_foo becomes foo
+  // foo        becomes __wrap_foo
+  // __wrap_foo becomes __real_foo
----------------
Is this correct? I thought foo becomes real_foo and wrap_foo becomes foo.


https://reviews.llvm.org/D34993





More information about the llvm-commits mailing list