[llvm] aedb528 - llvm-exegesis - fix shadow variable warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 9 05:49:24 PST 2019


Author: Simon Pilgrim
Date: 2019-11-09T13:43:09Z
New Revision: aedb528d4300a1dcb0980780f8ab45ecf64dc1d8

URL: https://github.com/llvm/llvm-project/commit/aedb528d4300a1dcb0980780f8ab45ecf64dc1d8
DIFF: https://github.com/llvm/llvm-project/commit/aedb528d4300a1dcb0980780f8ab45ecf64dc1d8.diff

LOG: llvm-exegesis - fix shadow variable warnings. NFCI.

Added: 
    

Modified: 
    llvm/tools/llvm-exegesis/lib/Assembler.cpp
    llvm/tools/llvm-exegesis/llvm-exegesis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-exegesis/lib/Assembler.cpp b/llvm/tools/llvm-exegesis/lib/Assembler.cpp
index 4983823df0fc..631aed0758f5 100644
--- a/llvm/tools/llvm-exegesis/lib/Assembler.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Assembler.cpp
@@ -70,7 +70,7 @@ static bool addPass(PassManagerBase &PM, StringRef PassName,
   return false;
 }
 
-MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionID,
+MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionName,
                                                   Module *Module,
                                                   MachineModuleInfo *MMI) {
   Type *const ReturnType = Type::getInt32Ty(Module->getContext());
@@ -79,7 +79,7 @@ MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionID,
   FunctionType *FunctionType =
       FunctionType::get(ReturnType, {MemParamType}, false);
   Function *const F = Function::Create(
-      FunctionType, GlobalValue::InternalLinkage, FunctionID, Module);
+      FunctionType, GlobalValue::InternalLinkage, FunctionName, Module);
   // Making sure we can create a MachineFunction out of this Function even if it
   // contains no IR.
   F->setIsMaterializable(true);

diff  --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 04792e6376a2..d16f88e47370 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -217,11 +217,11 @@ generateSnippets(const LLVMState &State, unsigned Opcode,
   if (InstrDesc.isCall() || InstrDesc.isReturn())
     return make_error<Failure>("Unsupported opcode: isCall/isReturn");
 
-  SnippetGenerator::Options Options;
-  Options.MaxConfigsPerOpcode = MaxConfigsPerOpcode;
+  SnippetGenerator::Options SnippetOptions;
+  SnippetOptions.MaxConfigsPerOpcode = MaxConfigsPerOpcode;
   const std::unique_ptr<SnippetGenerator> Generator =
       State.getExegesisTarget().createSnippetGenerator(BenchmarkMode, State,
-                                                       Options);
+                                                       SnippetOptions);
   if (!Generator)
     report_fatal_error("cannot create snippet generator");
   return Generator->generateConfigurations(Instr, ForbiddenRegs);


        


More information about the llvm-commits mailing list