summaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/Parser.cpp')
-rw-r--r--lib/AsmParser/Parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp
index aac4027..7280cf4 100644
--- a/lib/AsmParser/Parser.cpp
+++ b/lib/AsmParser/Parser.cpp
@@ -44,7 +44,7 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
std::string ErrorStr;
MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);
if (F == 0) {
- Err = SMDiagnostic("", -1, -1,
+ Err = SMDiagnostic(SMLoc(), "", -1, -1,
"Could not open input file '" + Filename + "': " +
ErrorStr, "");
return 0;
@@ -56,7 +56,7 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
Module *llvm::ParseAssemblyString(const char *AsmString, Module *M,
SMDiagnostic &Err, LLVMContext &Context) {
MemoryBuffer *F =
- MemoryBuffer::getMemBuffer(AsmString, AsmString+strlen(AsmString),
+ MemoryBuffer::getMemBuffer(StringRef(AsmString, strlen(AsmString)),
"<string>");
return ParseAssembly(F, M, Err, Context);
OpenPOWER on IntegriCloud