summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-19 16:58:54 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-19 16:58:54 +0000
commit11c07d7eec2889be194e1662277542af2c9359df (patch)
treecf10f6375d086cd35dc910d75cba0497bb53ce8a /llvm/tools
parent38f556d96d564fbd0fa9f76b5bd049338698b053 (diff)
downloadbcm5719-llvm-11c07d7eec2889be194e1662277542af2c9359df.tar.gz
bcm5719-llvm-11c07d7eec2889be194e1662277542af2c9359df.zip
Modernize the .ll parsing interface.
* Use StringRef instead of std::string& * Return a std::unique_ptr<Module> instead of taking an optional module to write to (was not really used). * Use current comment style. * Use current naming convention. llvm-svn: 215989
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-as/llvm-as.cpp2
-rw-r--r--llvm/tools/verify-uselistorder/verify-uselistorder.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-as/llvm-as.cpp b/llvm/tools/llvm-as/llvm-as.cpp
index 007241c5068..ef4f7ba272a 100644
--- a/llvm/tools/llvm-as/llvm-as.cpp
+++ b/llvm/tools/llvm-as/llvm-as.cpp
@@ -94,7 +94,7 @@ int main(int argc, char **argv) {
// Parse the file now...
SMDiagnostic Err;
- std::unique_ptr<Module> M(ParseAssemblyFile(InputFilename, Err, Context));
+ std::unique_ptr<Module> M = parseAssemblyFile(InputFilename, Err, Context);
if (!M.get()) {
Err.print(argv[0], errs());
return 1;
diff --git a/llvm/tools/verify-uselistorder/verify-uselistorder.cpp b/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
index 0bb9b0dce02..6a374279f8c 100644
--- a/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
+++ b/llvm/tools/verify-uselistorder/verify-uselistorder.cpp
@@ -168,7 +168,7 @@ std::unique_ptr<Module> TempFile::readBitcode(LLVMContext &Context) const {
std::unique_ptr<Module> TempFile::readAssembly(LLVMContext &Context) const {
DEBUG(dbgs() << " - read assembly\n");
SMDiagnostic Err;
- std::unique_ptr<Module> M(ParseAssemblyFile(Filename, Err, Context));
+ std::unique_ptr<Module> M = parseAssemblyFile(Filename, Err, Context);
if (!M.get())
DEBUG(dbgs() << "error: "; Err.print("verify-use-list-order", dbgs()));
return M;
OpenPOWER on IntegriCloud