LLVM  3.7.0
LLParser.h
Go to the documentation of this file.
1 //===-- LLParser.h - Parser Class -------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the parser class for .ll files.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_ASMPARSER_LLPARSER_H
15 #define LLVM_LIB_ASMPARSER_LLPARSER_H
16 
17 #include "LLLexer.h"
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/IR/Attributes.h"
21 #include "llvm/IR/Instructions.h"
22 #include "llvm/IR/Module.h"
23 #include "llvm/IR/Operator.h"
24 #include "llvm/IR/Type.h"
25 #include "llvm/IR/ValueHandle.h"
26 #include <map>
27 
28 namespace llvm {
29  class Module;
30  class OpaqueType;
31  class Function;
32  class Value;
33  class BasicBlock;
34  class Instruction;
35  class Constant;
36  class GlobalValue;
37  class Comdat;
38  class MDString;
39  class MDNode;
40  struct SlotMapping;
41  class StructType;
42 
43  /// ValID - Represents a reference of a definition of some sort with no type.
44  /// There are several cases where we have to parse the value but where the
45  /// type can depend on later context. This may either be a numeric reference
46  /// or a symbolic (%var) reference. This is just a discriminated union.
47  struct ValID {
48  enum {
49  t_LocalID, t_GlobalID, // ID in UIntVal.
50  t_LocalName, t_GlobalName, // Name in StrVal.
51  t_APSInt, t_APFloat, // Value in APSIntVal/APFloatVal.
52  t_Null, t_Undef, t_Zero, // No value.
53  t_EmptyArray, // No value: []
54  t_Constant, // Value in ConstantVal.
55  t_InlineAsm, // Value in StrVal/StrVal2/UIntVal.
56  t_ConstantStruct, // Value in ConstantStructElts.
57  t_PackedConstantStruct // Value in ConstantStructElts.
58  } Kind;
59 
61  unsigned UIntVal;
62  std::string StrVal, StrVal2;
67 
69  ~ValID() {
71  delete [] ConstantStructElts;
72  }
73 
74  bool operator<(const ValID &RHS) const {
75  if (Kind == t_LocalID || Kind == t_GlobalID)
76  return UIntVal < RHS.UIntVal;
77  assert((Kind == t_LocalName || Kind == t_GlobalName ||
79  "Ordering not defined for this ValID kind yet");
80  return StrVal < RHS.StrVal;
81  }
82  };
83 
84  class LLParser {
85  public:
87  private:
88  LLVMContext &Context;
89  LLLexer Lex;
90  Module *M;
91  SlotMapping *Slots;
92 
93  // Instruction metadata resolution. Each instruction can have a list of
94  // MDRef info associated with them.
95  //
96  // The simpler approach of just creating temporary MDNodes and then calling
97  // RAUW on them when the definition is processed doesn't work because some
98  // instruction metadata kinds, such as dbg, get stored in the IR in an
99  // "optimized" format which doesn't participate in the normal value use
100  // lists. This means that RAUW doesn't work, even on temporary MDNodes
101  // which otherwise support RAUW. Instead, we defer resolving MDNode
102  // references until the definitions have been processed.
103  struct MDRef {
104  SMLoc Loc;
105  unsigned MDKind, MDSlot;
106  };
107 
108  SmallVector<Instruction*, 64> InstsWithTBAATag;
109 
110  // Type resolution handling data structures. The location is set when we
111  // have processed a use of the type but not a definition yet.
113  std::map<unsigned, std::pair<Type*, LocTy> > NumberedTypes;
114 
115  std::map<unsigned, TrackingMDNodeRef> NumberedMetadata;
116  std::map<unsigned, std::pair<TempMDTuple, LocTy>> ForwardRefMDNodes;
117 
118  // Global Value reference information.
119  std::map<std::string, std::pair<GlobalValue*, LocTy> > ForwardRefVals;
120  std::map<unsigned, std::pair<GlobalValue*, LocTy> > ForwardRefValIDs;
121  std::vector<GlobalValue*> NumberedVals;
122 
123  // Comdat forward reference information.
124  std::map<std::string, LocTy> ForwardRefComdats;
125 
126  // References to blockaddress. The key is the function ValID, the value is
127  // a list of references to blocks in that function.
128  std::map<ValID, std::map<ValID, GlobalValue *>> ForwardRefBlockAddresses;
129  class PerFunctionState;
130  /// Reference to per-function state to allow basic blocks to be
131  /// forward-referenced by blockaddress instructions within the same
132  /// function.
133  PerFunctionState *BlockAddressPFS;
134 
135  // Attribute builder reference information.
136  std::map<Value*, std::vector<unsigned> > ForwardRefAttrGroups;
137  std::map<unsigned, AttrBuilder> NumberedAttrBuilders;
138 
139  public:
141  SlotMapping *Slots = nullptr)
142  : Context(M->getContext()), Lex(F, SM, Err, M->getContext()), M(M),
143  Slots(Slots), BlockAddressPFS(nullptr) {}
144  bool Run();
145 
146  LLVMContext &getContext() { return Context; }
147 
148  private:
149 
150  bool Error(LocTy L, const Twine &Msg) const {
151  return Lex.Error(L, Msg);
152  }
153  bool TokError(const Twine &Msg) const {
154  return Error(Lex.getLoc(), Msg);
155  }
156 
157  /// GetGlobalVal - Get a value with the specified name or ID, creating a
158  /// forward reference record if needed. This can return null if the value
159  /// exists but does not have the right type.
160  GlobalValue *GetGlobalVal(const std::string &N, Type *Ty, LocTy Loc);
161  GlobalValue *GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc);
162 
163  /// Get a Comdat with the specified name, creating a forward reference
164  /// record if needed.
165  Comdat *getComdat(const std::string &N, LocTy Loc);
166 
167  // Helper Routines.
168  bool ParseToken(lltok::Kind T, const char *ErrMsg);
169  bool EatIfPresent(lltok::Kind T) {
170  if (Lex.getKind() != T) return false;
171  Lex.Lex();
172  return true;
173  }
174 
175  FastMathFlags EatFastMathFlagsIfPresent() {
176  FastMathFlags FMF;
177  while (true)
178  switch (Lex.getKind()) {
179  case lltok::kw_fast: FMF.setUnsafeAlgebra(); Lex.Lex(); continue;
180  case lltok::kw_nnan: FMF.setNoNaNs(); Lex.Lex(); continue;
181  case lltok::kw_ninf: FMF.setNoInfs(); Lex.Lex(); continue;
182  case lltok::kw_nsz: FMF.setNoSignedZeros(); Lex.Lex(); continue;
183  case lltok::kw_arcp: FMF.setAllowReciprocal(); Lex.Lex(); continue;
184  default: return FMF;
185  }
186  return FMF;
187  }
188 
189  bool ParseOptionalToken(lltok::Kind T, bool &Present,
190  LocTy *Loc = nullptr) {
191  if (Lex.getKind() != T) {
192  Present = false;
193  } else {
194  if (Loc)
195  *Loc = Lex.getLoc();
196  Lex.Lex();
197  Present = true;
198  }
199  return false;
200  }
201  bool ParseStringConstant(std::string &Result);
202  bool ParseUInt32(unsigned &Val);
203  bool ParseUInt32(unsigned &Val, LocTy &Loc) {
204  Loc = Lex.getLoc();
205  return ParseUInt32(Val);
206  }
207  bool ParseUInt64(uint64_t &Val);
208  bool ParseUInt64(uint64_t &Val, LocTy &Loc) {
209  Loc = Lex.getLoc();
210  return ParseUInt64(Val);
211  }
212 
213  bool ParseTLSModel(GlobalVariable::ThreadLocalMode &TLM);
214  bool ParseOptionalThreadLocal(GlobalVariable::ThreadLocalMode &TLM);
215  bool parseOptionalUnnamedAddr(bool &UnnamedAddr) {
216  return ParseOptionalToken(lltok::kw_unnamed_addr, UnnamedAddr);
217  }
218  bool ParseOptionalAddrSpace(unsigned &AddrSpace);
219  bool ParseOptionalParamAttrs(AttrBuilder &B);
220  bool ParseOptionalReturnAttrs(AttrBuilder &B);
221  bool ParseOptionalLinkage(unsigned &Linkage, bool &HasLinkage);
222  bool ParseOptionalLinkage(unsigned &Linkage) {
223  bool HasLinkage; return ParseOptionalLinkage(Linkage, HasLinkage);
224  }
225  bool ParseOptionalVisibility(unsigned &Visibility);
226  bool ParseOptionalDLLStorageClass(unsigned &DLLStorageClass);
227  bool ParseOptionalCallingConv(unsigned &CC);
228  bool ParseOptionalAlignment(unsigned &Alignment);
229  bool ParseOptionalDerefAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes);
230  bool ParseScopeAndOrdering(bool isAtomic, SynchronizationScope &Scope,
231  AtomicOrdering &Ordering);
232  bool ParseOrdering(AtomicOrdering &Ordering);
233  bool ParseOptionalStackAlignment(unsigned &Alignment);
234  bool ParseOptionalCommaAlign(unsigned &Alignment, bool &AteExtraComma);
235  bool ParseOptionalCommaInAlloca(bool &IsInAlloca);
236  bool ParseIndexList(SmallVectorImpl<unsigned> &Indices,bool &AteExtraComma);
237  bool ParseIndexList(SmallVectorImpl<unsigned> &Indices) {
238  bool AteExtraComma;
239  if (ParseIndexList(Indices, AteExtraComma)) return true;
240  if (AteExtraComma)
241  return TokError("expected index");
242  return false;
243  }
244 
245  // Top-Level Entities
246  bool ParseTopLevelEntities();
247  bool ValidateEndOfModule();
248  bool ParseTargetDefinition();
249  bool ParseModuleAsm();
250  bool ParseDepLibs(); // FIXME: Remove in 4.0.
251  bool ParseUnnamedType();
252  bool ParseNamedType();
253  bool ParseDeclare();
254  bool ParseDefine();
255 
256  bool ParseGlobalType(bool &IsConstant);
257  bool ParseUnnamedGlobal();
258  bool ParseNamedGlobal();
259  bool ParseGlobal(const std::string &Name, LocTy Loc, unsigned Linkage,
260  bool HasLinkage, unsigned Visibility,
261  unsigned DLLStorageClass,
262  GlobalVariable::ThreadLocalMode TLM, bool UnnamedAddr);
263  bool ParseAlias(const std::string &Name, LocTy Loc, unsigned Linkage,
264  unsigned Visibility, unsigned DLLStorageClass,
265  GlobalVariable::ThreadLocalMode TLM, bool UnnamedAddr);
266  bool parseComdat();
267  bool ParseStandaloneMetadata();
268  bool ParseNamedMetadata();
269  bool ParseMDString(MDString *&Result);
270  bool ParseMDNodeID(MDNode *&Result);
271  bool ParseUnnamedAttrGrp();
272  bool ParseFnAttributeValuePairs(AttrBuilder &B,
273  std::vector<unsigned> &FwdRefAttrGrps,
274  bool inAttrGrp, LocTy &BuiltinLoc);
275 
276  // Type Parsing.
277  bool ParseType(Type *&Result, const Twine &Msg, bool AllowVoid = false);
278  bool ParseType(Type *&Result, bool AllowVoid = false) {
279  return ParseType(Result, "expected type", AllowVoid);
280  }
281  bool ParseType(Type *&Result, const Twine &Msg, LocTy &Loc,
282  bool AllowVoid = false) {
283  Loc = Lex.getLoc();
284  return ParseType(Result, Msg, AllowVoid);
285  }
286  bool ParseType(Type *&Result, LocTy &Loc, bool AllowVoid = false) {
287  Loc = Lex.getLoc();
288  return ParseType(Result, AllowVoid);
289  }
290  bool ParseAnonStructType(Type *&Result, bool Packed);
291  bool ParseStructBody(SmallVectorImpl<Type*> &Body);
292  bool ParseStructDefinition(SMLoc TypeLoc, StringRef Name,
293  std::pair<Type*, LocTy> &Entry,
294  Type *&ResultTy);
295 
296  bool ParseArrayVectorType(Type *&Result, bool isVector);
297  bool ParseFunctionType(Type *&Result);
298 
299  // Function Semantic Analysis.
300  class PerFunctionState {
301  LLParser &P;
302  Function &F;
303  std::map<std::string, std::pair<Value*, LocTy> > ForwardRefVals;
304  std::map<unsigned, std::pair<Value*, LocTy> > ForwardRefValIDs;
305  std::vector<Value*> NumberedVals;
306 
307  /// FunctionNumber - If this is an unnamed function, this is the slot
308  /// number of it, otherwise it is -1.
309  int FunctionNumber;
310  public:
311  PerFunctionState(LLParser &p, Function &f, int FunctionNumber);
312  ~PerFunctionState();
313 
314  Function &getFunction() const { return F; }
315 
316  bool FinishFunction();
317 
318  /// GetVal - Get a value with the specified name or ID, creating a
319  /// forward reference record if needed. This can return null if the value
320  /// exists but does not have the right type.
321  Value *GetVal(const std::string &Name, Type *Ty, LocTy Loc);
322  Value *GetVal(unsigned ID, Type *Ty, LocTy Loc);
323 
324  /// SetInstName - After an instruction is parsed and inserted into its
325  /// basic block, this installs its name.
326  bool SetInstName(int NameID, const std::string &NameStr, LocTy NameLoc,
327  Instruction *Inst);
328 
329  /// GetBB - Get a basic block with the specified name or ID, creating a
330  /// forward reference record if needed. This can return null if the value
331  /// is not a BasicBlock.
332  BasicBlock *GetBB(const std::string &Name, LocTy Loc);
333  BasicBlock *GetBB(unsigned ID, LocTy Loc);
334 
335  /// DefineBB - Define the specified basic block, which is either named or
336  /// unnamed. If there is an error, this returns null otherwise it returns
337  /// the block being defined.
338  BasicBlock *DefineBB(const std::string &Name, LocTy Loc);
339 
340  bool resolveForwardRefBlockAddresses();
341  };
342 
343  bool ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
344  PerFunctionState *PFS);
345 
346  bool ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS);
347  bool ParseValue(Type *Ty, Value *&V, PerFunctionState &PFS) {
348  return ParseValue(Ty, V, &PFS);
349  }
350  bool ParseValue(Type *Ty, Value *&V, LocTy &Loc,
351  PerFunctionState &PFS) {
352  Loc = Lex.getLoc();
353  return ParseValue(Ty, V, &PFS);
354  }
355 
356  bool ParseTypeAndValue(Value *&V, PerFunctionState *PFS);
357  bool ParseTypeAndValue(Value *&V, PerFunctionState &PFS) {
358  return ParseTypeAndValue(V, &PFS);
359  }
360  bool ParseTypeAndValue(Value *&V, LocTy &Loc, PerFunctionState &PFS) {
361  Loc = Lex.getLoc();
362  return ParseTypeAndValue(V, PFS);
363  }
364  bool ParseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
365  PerFunctionState &PFS);
366  bool ParseTypeAndBasicBlock(BasicBlock *&BB, PerFunctionState &PFS) {
367  LocTy Loc;
368  return ParseTypeAndBasicBlock(BB, Loc, PFS);
369  }
370 
371 
372  struct ParamInfo {
373  LocTy Loc;
374  Value *V;
375  AttributeSet Attrs;
376  ParamInfo(LocTy loc, Value *v, AttributeSet attrs)
377  : Loc(loc), V(v), Attrs(attrs) {}
378  };
379  bool ParseParameterList(SmallVectorImpl<ParamInfo> &ArgList,
380  PerFunctionState &PFS,
381  bool IsMustTailCall = false,
382  bool InVarArgsFunc = false);
383 
384  // Constant Parsing.
385  bool ParseValID(ValID &ID, PerFunctionState *PFS = nullptr);
386  bool ParseGlobalValue(Type *Ty, Constant *&V);
387  bool ParseGlobalTypeAndValue(Constant *&V);
388  bool ParseGlobalValueVector(SmallVectorImpl<Constant *> &Elts);
389  bool parseOptionalComdat(StringRef GlobalName, Comdat *&C);
390  bool ParseMetadataAsValue(Value *&V, PerFunctionState &PFS);
391  bool ParseValueAsMetadata(Metadata *&MD, const Twine &TypeMsg,
392  PerFunctionState *PFS);
393  bool ParseMetadata(Metadata *&MD, PerFunctionState *PFS);
394  bool ParseMDTuple(MDNode *&MD, bool IsDistinct = false);
395  bool ParseMDNode(MDNode *&MD);
396  bool ParseMDNodeTail(MDNode *&MD);
397  bool ParseMDNodeVector(SmallVectorImpl<Metadata *> &MDs);
398  bool ParseMetadataAttachment(unsigned &Kind, MDNode *&MD);
399  bool ParseInstructionMetadata(Instruction &Inst);
400  bool ParseOptionalFunctionMetadata(Function &F);
401 
402  template <class FieldTy>
403  bool ParseMDField(LocTy Loc, StringRef Name, FieldTy &Result);
404  template <class FieldTy> bool ParseMDField(StringRef Name, FieldTy &Result);
405  template <class ParserTy>
406  bool ParseMDFieldsImplBody(ParserTy parseField);
407  template <class ParserTy>
408  bool ParseMDFieldsImpl(ParserTy parseField, LocTy &ClosingLoc);
409  bool ParseSpecializedMDNode(MDNode *&N, bool IsDistinct = false);
410 
411 #define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) \
412  bool Parse##CLASS(MDNode *&Result, bool IsDistinct);
413 #include "llvm/IR/Metadata.def"
414 
415  // Function Parsing.
416  struct ArgInfo {
417  LocTy Loc;
418  Type *Ty;
419  AttributeSet Attrs;
420  std::string Name;
421  ArgInfo(LocTy L, Type *ty, AttributeSet Attr, const std::string &N)
422  : Loc(L), Ty(ty), Attrs(Attr), Name(N) {}
423  };
424  bool ParseArgumentList(SmallVectorImpl<ArgInfo> &ArgList, bool &isVarArg);
425  bool ParseFunctionHeader(Function *&Fn, bool isDefine);
426  bool ParseFunctionBody(Function &Fn);
427  bool ParseBasicBlock(PerFunctionState &PFS);
428 
429  enum TailCallType { TCT_None, TCT_Tail, TCT_MustTail };
430 
431  // Instruction Parsing. Each instruction parsing routine can return with a
432  // normal result, an error result, or return having eaten an extra comma.
433  enum InstResult { InstNormal = 0, InstError = 1, InstExtraComma = 2 };
434  int ParseInstruction(Instruction *&Inst, BasicBlock *BB,
435  PerFunctionState &PFS);
436  bool ParseCmpPredicate(unsigned &Pred, unsigned Opc);
437 
438  bool ParseRet(Instruction *&Inst, BasicBlock *BB, PerFunctionState &PFS);
439  bool ParseBr(Instruction *&Inst, PerFunctionState &PFS);
440  bool ParseSwitch(Instruction *&Inst, PerFunctionState &PFS);
441  bool ParseIndirectBr(Instruction *&Inst, PerFunctionState &PFS);
442  bool ParseInvoke(Instruction *&Inst, PerFunctionState &PFS);
443  bool ParseResume(Instruction *&Inst, PerFunctionState &PFS);
444 
445  bool ParseArithmetic(Instruction *&I, PerFunctionState &PFS, unsigned Opc,
446  unsigned OperandType);
447  bool ParseLogical(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
448  bool ParseCompare(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
449  bool ParseCast(Instruction *&I, PerFunctionState &PFS, unsigned Opc);
450  bool ParseSelect(Instruction *&I, PerFunctionState &PFS);
451  bool ParseVA_Arg(Instruction *&I, PerFunctionState &PFS);
452  bool ParseExtractElement(Instruction *&I, PerFunctionState &PFS);
453  bool ParseInsertElement(Instruction *&I, PerFunctionState &PFS);
454  bool ParseShuffleVector(Instruction *&I, PerFunctionState &PFS);
455  int ParsePHI(Instruction *&I, PerFunctionState &PFS);
456  bool ParseLandingPad(Instruction *&I, PerFunctionState &PFS);
457  bool ParseCall(Instruction *&I, PerFunctionState &PFS,
458  CallInst::TailCallKind IsTail);
459  int ParseAlloc(Instruction *&I, PerFunctionState &PFS);
460  int ParseLoad(Instruction *&I, PerFunctionState &PFS);
461  int ParseStore(Instruction *&I, PerFunctionState &PFS);
462  int ParseCmpXchg(Instruction *&I, PerFunctionState &PFS);
463  int ParseAtomicRMW(Instruction *&I, PerFunctionState &PFS);
464  int ParseFence(Instruction *&I, PerFunctionState &PFS);
465  int ParseGetElementPtr(Instruction *&I, PerFunctionState &PFS);
466  int ParseExtractValue(Instruction *&I, PerFunctionState &PFS);
467  int ParseInsertValue(Instruction *&I, PerFunctionState &PFS);
468 
469  // Use-list order directives.
470  bool ParseUseListOrder(PerFunctionState *PFS = nullptr);
471  bool ParseUseListOrderBB();
472  bool ParseUseListOrderIndexes(SmallVectorImpl<unsigned> &Indexes);
473  bool sortUseListOrder(Value *V, ArrayRef<unsigned> Indexes, SMLoc Loc);
474  };
475 } // End llvm namespace
476 
477 #endif
LLLexer::LocTy Loc
Definition: LLParser.h:60
Various leaf nodes.
Definition: ISDOpcodes.h:60
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:114
LLVMContext & getContext()
Definition: LLParser.h:146
F(f)
unsigned UIntVal
Definition: LLParser.h:61
ELFYAML::ELF_STV Visibility
Definition: ELFYAML.cpp:590
bool Run()
Run: module ::= toplevelentity*.
Definition: LLParser.cpp:43
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
This file contains the simple types necessary to represent the attributes associated with functions a...
lltok::Kind Lex()
Definition: LLLexer.h:49
SynchronizationScope
Definition: Instructions.h:49
AtomicOrdering
Definition: Instructions.h:38
#define T
bool operator<(const ValID &RHS) const
Definition: LLParser.h:74
std::string StrVal
Definition: LLParser.h:62
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
Definition: APFloat.h:122
#define P(N)
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:41
This is an important base class in LLVM.
Definition: Constant.h:41
Constant * ConstantVal
Definition: LLParser.h:65
LocTy getLoc() const
Definition: LLLexer.h:54
APFloat APFloatVal
Definition: LLParser.h:64
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling...
Definition: SourceMgr.h:35
bool Error(LocTy L, const Twine &Msg) const
Definition: LLLexer.cpp:32
static bool isAtomic(Instruction *I)
Constant ** ConstantStructElts
Definition: LLParser.h:66
LLParser(StringRef F, SourceMgr &SM, SMDiagnostic &Err, Module *M, SlotMapping *Slots=nullptr)
Definition: LLParser.h:140
APSInt APSIntVal
Definition: LLParser.h:63
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:861
Module.h This file contains the declarations for the Module class.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:214
This struct contains the mapping from the slot numbers to unnamed metadata nodes and global values...
Definition: SlotMapping.h:27
FunctionNumber(functionNumber)
Definition: LLParser.cpp:2146
ValID - Represents a reference of a definition of some sort with no type.
Definition: LLParser.h:47
OperandType
Types of operands to CF instructions.
#define I(x, y, z)
Definition: MD5.cpp:54
#define N
enum llvm::ValID::@195 Kind
lltok::Kind getKind() const
Definition: LLLexer.h:55
const ARM::ArchExtKind Kind
std::string StrVal2
Definition: LLParser.h:62
LLLexer::LocTy LocTy
Definition: LLParser.h:86
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
Represents a location in source code.
Definition: SMLoc.h:23
TLM
Definition: LLParser.cpp:1199
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Definition: SourceMgr.h:233