@@ -36,10 +36,12 @@ class Type;
3636// / \param Context Context in which to allocate globals info.
3737// / \param Slots The optional slot mapping that will be initialized during
3838// / parsing.
39- std::unique_ptr<Module> parseAssemblyFile (StringRef Filename,
40- SMDiagnostic &Error,
41- LLVMContext &Context,
42- SlotMapping *Slots = nullptr );
39+ // / \param UpgradeDebugInfo Run UpgradeDebugInfo, which runs the Verifier.
40+ // / This option should only be set to false by llvm-as
41+ // / for use inside the LLVM testuite!
42+ std::unique_ptr<Module>
43+ parseAssemblyFile (StringRef Filename, SMDiagnostic &Error, LLVMContext &Context,
44+ SlotMapping *Slots = nullptr , bool UpgradeDebugInfo = true );
4345
4446// / The function is a secondary interface to the LLVM Assembly Parser. It parses
4547// / an ASCII string that (presumably) contains LLVM Assembly code. It returns a
@@ -52,20 +54,28 @@ std::unique_ptr<Module> parseAssemblyFile(StringRef Filename,
5254// / \param Context Context in which to allocate globals info.
5355// / \param Slots The optional slot mapping that will be initialized during
5456// / parsing.
57+ // / \param UpgradeDebugInfo Run UpgradeDebugInfo, which runs the Verifier.
58+ // / This option should only be set to false by llvm-as
59+ // / for use inside the LLVM testuite!
5560std::unique_ptr<Module> parseAssemblyString (StringRef AsmString,
5661 SMDiagnostic &Error,
5762 LLVMContext &Context,
58- SlotMapping *Slots = nullptr );
63+ SlotMapping *Slots = nullptr ,
64+ bool UpgradeDebugInfo = true );
5965
6066// / parseAssemblyFile and parseAssemblyString are wrappers around this function.
6167// / \brief Parse LLVM Assembly from a MemoryBuffer.
6268// / \param F The MemoryBuffer containing assembly
6369// / \param Err Error result info.
6470// / \param Slots The optional slot mapping that will be initialized during
6571// / parsing.
72+ // / \param UpgradeDebugInfo Run UpgradeDebugInfo, which runs the Verifier.
73+ // / This option should only be set to false by llvm-as
74+ // / for use inside the LLVM testuite!
6675std::unique_ptr<Module> parseAssembly (MemoryBufferRef F, SMDiagnostic &Err,
6776 LLVMContext &Context,
68- SlotMapping *Slots = nullptr );
77+ SlotMapping *Slots = nullptr ,
78+ bool UpgradeDebugInfo = true );
6979
7080// / This function is the low-level interface to the LLVM Assembly Parser.
7181// / This is kept as an independent function instead of being inlined into
@@ -78,8 +88,12 @@ std::unique_ptr<Module> parseAssembly(MemoryBufferRef F, SMDiagnostic &Err,
7888// / \param Slots The optional slot mapping that will be initialized during
7989// / parsing.
8090// / \return true on error.
91+ // / \param UpgradeDebugInfo Run UpgradeDebugInfo, which runs the Verifier.
92+ // / This option should only be set to false by llvm-as
93+ // / for use inside the LLVM testuite!
8194bool parseAssemblyInto (MemoryBufferRef F, Module &M, SMDiagnostic &Err,
82- SlotMapping *Slots = nullptr );
95+ SlotMapping *Slots = nullptr ,
96+ bool UpgradeDebugInfo = true );
8397
8498// / Parse a type and a constant value in the given string.
8599// /
0 commit comments