[llvm] r336879 - [AsmParser] Fix inconsistent declaration parameter name
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 11 19:03:53 PDT 2018
Author: maskray
Date: Wed Jul 11 19:03:53 2018
New Revision: 336879
URL: http://llvm.org/viewvc/llvm-project?rev=336879&view=rev
Log:
[AsmParser] Fix inconsistent declaration parameter name
Modified:
llvm/trunk/include/llvm/AsmParser/Parser.h
llvm/trunk/lib/AsmParser/LLLexer.cpp
llvm/trunk/lib/AsmParser/LLLexer.h
llvm/trunk/lib/AsmParser/LLParser.h
Modified: llvm/trunk/include/llvm/AsmParser/Parser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/AsmParser/Parser.h?rev=336879&r1=336878&r2=336879&view=diff
==============================================================================
--- llvm/trunk/include/llvm/AsmParser/Parser.h (original)
+++ llvm/trunk/include/llvm/AsmParser/Parser.h Wed Jul 11 19:03:53 2018
@@ -42,7 +42,7 @@ class Type;
/// for use inside the LLVM testuite!
/// \param DataLayoutString Override datalayout in the llvm assembly.
std::unique_ptr<Module>
-parseAssemblyFile(StringRef Filename, SMDiagnostic &Error, LLVMContext &Context,
+parseAssemblyFile(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context,
SlotMapping *Slots = nullptr, bool UpgradeDebugInfo = true,
StringRef DataLayoutString = "");
@@ -62,7 +62,7 @@ parseAssemblyFile(StringRef Filename, SM
/// for use inside the LLVM testuite!
/// \param DataLayoutString Override datalayout in the llvm assembly.
std::unique_ptr<Module> parseAssemblyString(StringRef AsmString,
- SMDiagnostic &Error,
+ SMDiagnostic &Err,
LLVMContext &Context,
SlotMapping *Slots = nullptr,
bool UpgradeDebugInfo = true,
@@ -92,7 +92,7 @@ struct ParsedModuleAndIndex {
/// for use inside the LLVM testuite!
/// \param DataLayoutString Override datalayout in the llvm assembly.
ParsedModuleAndIndex
-parseAssemblyFileWithIndex(StringRef Filename, SMDiagnostic &Error,
+parseAssemblyFileWithIndex(StringRef Filename, SMDiagnostic &Err,
LLVMContext &Context, SlotMapping *Slots = nullptr,
bool UpgradeDebugInfo = true,
StringRef DataLayoutString = "");
@@ -106,7 +106,7 @@ parseAssemblyFileWithIndex(StringRef Fil
/// \param Filename The name of the file to parse
/// \param Error Error result info.
std::unique_ptr<ModuleSummaryIndex>
-parseSummaryIndexAssemblyFile(StringRef Filename, SMDiagnostic &Error);
+parseSummaryIndexAssemblyFile(StringRef Filename, SMDiagnostic &Err);
/// parseAssemblyFile and parseAssemblyString are wrappers around this function.
/// Parse LLVM Assembly from a MemoryBuffer.
Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=336879&r1=336878&r2=336879&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.cpp Wed Jul 11 19:03:53 2018
@@ -157,9 +157,9 @@ static const char *isLabelTail(const cha
// Lexer definition.
//===----------------------------------------------------------------------===//
-LLLexer::LLLexer(StringRef StartBuf, SourceMgr &sm, SMDiagnostic &Err,
+LLLexer::LLLexer(StringRef StartBuf, SourceMgr &SM, SMDiagnostic &Err,
LLVMContext &C)
- : CurBuf(StartBuf), ErrorInfo(Err), SM(sm), Context(C), APFloatVal(0.0),
+ : CurBuf(StartBuf), ErrorInfo(Err), SM(SM), Context(C), APFloatVal(0.0),
IgnoreColonInIdentifiers(false) {
CurPtr = CurBuf.begin();
}
Modified: llvm/trunk/lib/AsmParser/LLLexer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.h?rev=336879&r1=336878&r2=336879&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.h (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.h Wed Jul 11 19:03:53 2018
@@ -67,7 +67,7 @@ namespace llvm {
IgnoreColonInIdentifiers = val;
}
- bool Error(LocTy L, const Twine &Msg) const;
+ bool Error(LocTy ErrorLoc, const Twine &Msg) const;
bool Error(const Twine &Msg) const { return Error(getLoc(), Msg); }
void Warning(LocTy WarningLoc, const Twine &Msg) const;
@@ -98,7 +98,7 @@ namespace llvm {
uint64_t atoull(const char *Buffer, const char *End);
uint64_t HexIntToVal(const char *Buffer, const char *End);
void HexToIntPair(const char *Buffer, const char *End, uint64_t Pair[2]);
- void FP80HexToIntPair(const char *Buff, const char *End, uint64_t Pair[2]);
+ void FP80HexToIntPair(const char *Buffer, const char *End, uint64_t Pair[2]);
};
} // end namespace llvm
Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=336879&r1=336878&r2=336879&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Wed Jul 11 19:03:53 2018
@@ -202,12 +202,12 @@ namespace llvm {
/// GetGlobalVal - Get a value with the specified name or ID, creating a
/// forward reference record if needed. This can return null if the value
/// exists but does not have the right type.
- GlobalValue *GetGlobalVal(const std::string &N, Type *Ty, LocTy Loc);
+ GlobalValue *GetGlobalVal(const std::string &Name, Type *Ty, LocTy Loc);
GlobalValue *GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc);
/// Get a Comdat with the specified name, creating a forward reference
/// record if needed.
- Comdat *getComdat(const std::string &N, LocTy Loc);
+ Comdat *getComdat(const std::string &Name, LocTy Loc);
// Helper Routines.
bool ParseToken(lltok::Kind T, const char *ErrMsg);
@@ -270,12 +270,12 @@ namespace llvm {
bool ParseOptionalAddrSpace(unsigned &AddrSpace);
bool ParseOptionalParamAttrs(AttrBuilder &B);
bool ParseOptionalReturnAttrs(AttrBuilder &B);
- bool ParseOptionalLinkage(unsigned &Linkage, bool &HasLinkage,
+ bool ParseOptionalLinkage(unsigned &Res, bool &HasLinkage,
unsigned &Visibility, unsigned &DLLStorageClass,
bool &DSOLocal);
void ParseOptionalDSOLocal(bool &DSOLocal);
- void ParseOptionalVisibility(unsigned &Visibility);
- void ParseOptionalDLLStorageClass(unsigned &DLLStorageClass);
+ void ParseOptionalVisibility(unsigned &Res);
+ void ParseOptionalDLLStorageClass(unsigned &Res);
bool ParseOptionalCallingConv(unsigned &CC);
bool ParseOptionalAlignment(unsigned &Alignment);
bool ParseOptionalDerefAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes);
@@ -288,7 +288,7 @@ namespace llvm {
bool ParseOptionalCommaAddrSpace(unsigned &AddrSpace, LocTy &Loc,
bool &AteExtraComma);
bool ParseOptionalCommaInAlloca(bool &IsInAlloca);
- bool parseAllocSizeArguments(unsigned &ElemSizeArg,
+ bool parseAllocSizeArguments(unsigned &BaseSizeArg,
Optional<unsigned> &HowManyArg);
bool ParseIndexList(SmallVectorImpl<unsigned> &Indices,
bool &AteExtraComma);
@@ -316,13 +316,13 @@ namespace llvm {
bool ParseGlobalType(bool &IsConstant);
bool ParseUnnamedGlobal();
bool ParseNamedGlobal();
- bool ParseGlobal(const std::string &Name, LocTy Loc, unsigned Linkage,
+ bool ParseGlobal(const std::string &Name, LocTy NameLoc, unsigned Linkage,
bool HasLinkage, unsigned Visibility,
unsigned DLLStorageClass, bool DSOLocal,
GlobalVariable::ThreadLocalMode TLM,
GlobalVariable::UnnamedAddr UnnamedAddr);
- bool parseIndirectSymbol(const std::string &Name, LocTy Loc,
- unsigned Linkage, unsigned Visibility,
+ bool parseIndirectSymbol(const std::string &Name, LocTy NameLoc,
+ unsigned L, unsigned Visibility,
unsigned DLLStorageClass, bool DSOLocal,
GlobalVariable::ThreadLocalMode TLM,
GlobalVariable::UnnamedAddr UnnamedAddr);
@@ -413,7 +413,7 @@ namespace llvm {
/// number of it, otherwise it is -1.
int FunctionNumber;
public:
- PerFunctionState(LLParser &p, Function &f, int FunctionNumber);
+ PerFunctionState(LLParser &p, Function &f, int functionNumber);
~PerFunctionState();
Function &getFunction() const { return F; }
@@ -497,7 +497,7 @@ namespace llvm {
// Constant Parsing.
bool ParseValID(ValID &ID, PerFunctionState *PFS = nullptr);
- bool ParseGlobalValue(Type *Ty, Constant *&V);
+ bool ParseGlobalValue(Type *Ty, Constant *&C);
bool ParseGlobalTypeAndValue(Constant *&V);
bool ParseGlobalValueVector(SmallVectorImpl<Constant *> &Elts,
Optional<unsigned> *InRangeOp = nullptr);
@@ -507,9 +507,9 @@ namespace llvm {
PerFunctionState *PFS);
bool ParseMetadata(Metadata *&MD, PerFunctionState *PFS);
bool ParseMDTuple(MDNode *&MD, bool IsDistinct = false);
- bool ParseMDNode(MDNode *&MD);
- bool ParseMDNodeTail(MDNode *&MD);
- bool ParseMDNodeVector(SmallVectorImpl<Metadata *> &MDs);
+ bool ParseMDNode(MDNode *&N);
+ bool ParseMDNodeTail(MDNode *&N);
+ bool ParseMDNodeVector(SmallVectorImpl<Metadata *> &Elts);
bool ParseMetadataAttachment(unsigned &Kind, MDNode *&MD);
bool ParseInstructionMetadata(Instruction &Inst);
bool ParseGlobalObjectMetadataAttachment(GlobalObject &GO);
@@ -549,7 +549,7 @@ namespace llvm {
enum InstResult { InstNormal = 0, InstError = 1, InstExtraComma = 2 };
int ParseInstruction(Instruction *&Inst, BasicBlock *BB,
PerFunctionState &PFS);
- bool ParseCmpPredicate(unsigned &Pred, unsigned Opc);
+ bool ParseCmpPredicate(unsigned &P, unsigned Opc);
bool ParseRet(Instruction *&Inst, BasicBlock *BB, PerFunctionState &PFS);
bool ParseBr(Instruction *&Inst, PerFunctionState &PFS);
@@ -563,29 +563,29 @@ namespace llvm {
bool ParseCatchPad(Instruction *&Inst, PerFunctionState &PFS);
bool ParseCleanupPad(Instruction *&Inst, PerFunctionState &PFS);
- bool ParseArithmetic(Instruction *&I, PerFunctionState &PFS, unsigned Opc,
+ bool ParseArithmetic(Instruction *&Inst, PerFunctionState &PFS, unsigned Opc,
unsigned OperandType);
- bool ParseLogical(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
- bool ParseCompare(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
- bool ParseCast(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
- bool ParseSelect(Instruction *&I, PerFunctionState &PFS);
- bool ParseVA_Arg(Instruction *&I, PerFunctionState &PFS);
- bool ParseExtractElement(Instruction *&I, PerFunctionState &PFS);
- bool ParseInsertElement(Instruction *&I, PerFunctionState &PFS);
- bool ParseShuffleVector(Instruction *&I, PerFunctionState &PFS);
- int ParsePHI(Instruction *&I, PerFunctionState &PFS);
- bool ParseLandingPad(Instruction *&I, PerFunctionState &PFS);
- bool ParseCall(Instruction *&I, PerFunctionState &PFS,
- CallInst::TailCallKind IsTail);
- int ParseAlloc(Instruction *&I, PerFunctionState &PFS);
- int ParseLoad(Instruction *&I, PerFunctionState &PFS);
- int ParseStore(Instruction *&I, PerFunctionState &PFS);
- int ParseCmpXchg(Instruction *&I, PerFunctionState &PFS);
- int ParseAtomicRMW(Instruction *&I, PerFunctionState &PFS);
- int ParseFence(Instruction *&I, PerFunctionState &PFS);
- int ParseGetElementPtr(Instruction *&I, PerFunctionState &PFS);
- int ParseExtractValue(Instruction *&I, PerFunctionState &PFS);
- int ParseInsertValue(Instruction *&I, PerFunctionState &PFS);
+ bool ParseLogical(Instruction *&Inst, PerFunctionState &PFS, unsigned Opc);
+ bool ParseCompare(Instruction *&Inst, PerFunctionState &PFS, unsigned Opc);
+ bool ParseCast(Instruction *&Inst, PerFunctionState &PFS, unsigned Opc);
+ bool ParseSelect(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseVA_Arg(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseExtractElement(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseInsertElement(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseShuffleVector(Instruction *&Inst, PerFunctionState &PFS);
+ int ParsePHI(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS);
+ bool ParseCall(Instruction *&Inst, PerFunctionState &PFS,
+ CallInst::TailCallKind TCK);
+ int ParseAlloc(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseLoad(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseStore(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseCmpXchg(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseAtomicRMW(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseFence(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseExtractValue(Instruction *&Inst, PerFunctionState &PFS);
+ int ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS);
// Use-list order directives.
bool ParseUseListOrder(PerFunctionState *PFS = nullptr);
More information about the llvm-commits
mailing list