diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-05 20:45:17 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-05 20:45:17 +0000 |
commit | 1c4bab3ba4e0e16479c3be32996269ebf45bafa1 (patch) | |
tree | 43184ba6b0d33dafbbe84d89579a79f671491a65 /llvm/tools/llvm-opt-report/OptReport.cpp | |
parent | 47db2262ebcc598a51b2855b112b809cf41774c3 (diff) | |
download | bcm5719-llvm-1c4bab3ba4e0e16479c3be32996269ebf45bafa1.tar.gz bcm5719-llvm-1c4bab3ba4e0e16479c3be32996269ebf45bafa1.zip |
[OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks
Getting rid of the name "optimization remarks" for anything that
involves handling remarks on the client side.
It's safer to do this now, before we get stuck with that name in all the
APIs and public interfaces we decide to export to users in the future.
This renames llvm/tools/opt-remarks to llvm/tools/remarks-shlib, and now
generates `libRemarks.dylib` instead of `libOptRemarks.dylib`.
Differential Revision: https://reviews.llvm.org/D58535
llvm-svn: 355439
Diffstat (limited to 'llvm/tools/llvm-opt-report/OptReport.cpp')
-rw-r--r-- | llvm/tools/llvm-opt-report/OptReport.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/tools/llvm-opt-report/OptReport.cpp b/llvm/tools/llvm-opt-report/OptReport.cpp index d8a9de82739..43718eaedc0 100644 --- a/llvm/tools/llvm-opt-report/OptReport.cpp +++ b/llvm/tools/llvm-opt-report/OptReport.cpp @@ -13,7 +13,7 @@ /// //===----------------------------------------------------------------------===// -#include "llvm-c/OptRemarks.h" +#include "llvm-c/Remarks.h" #include "llvm/Demangle/Demangle.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Error.h" @@ -152,11 +152,11 @@ static bool readLocationInfo(LocationInfoTy &LocationInfo) { } StringRef Buffer = (*Buf)->getBuffer(); - LLVMOptRemarkParserRef Parser = - LLVMOptRemarkParserCreate(Buffer.data(), Buffer.size()); + LLVMRemarkParserRef Parser = + LLVMRemarkParserCreate(Buffer.data(), Buffer.size()); - LLVMOptRemarkEntry *Remark = nullptr; - while ((Remark = LLVMOptRemarkParserGetNext(Parser))) { + LLVMRemarkEntry *Remark = nullptr; + while ((Remark = LLVMRemarkParserGetNext(Parser))) { bool Transformed = StringRef(Remark->RemarkType.Str, Remark->RemarkType.Len) == "!Passed"; StringRef Pass(Remark->PassName.Str, Remark->PassName.Len); @@ -165,13 +165,13 @@ static bool readLocationInfo(LocationInfoTy &LocationInfo) { StringRef Function(Remark->FunctionName.Str, Remark->FunctionName.Len); uint32_t Line = Remark->DebugLoc.SourceLineNumber; uint32_t Column = Remark->DebugLoc.SourceColumnNumber; - ArrayRef<LLVMOptRemarkArg> Args(Remark->Args, Remark->NumArgs); + ArrayRef<LLVMRemarkArg> Args(Remark->Args, Remark->NumArgs); int VectorizationFactor = 1; int InterleaveCount = 1; int UnrollCount = 1; - for (const LLVMOptRemarkArg &Arg : Args) { + for (const LLVMRemarkArg &Arg : Args) { StringRef ArgKeyName(Arg.Key.Str, Arg.Key.Len); StringRef ArgValue(Arg.Value.Str, Arg.Value.Len); if (ArgKeyName == "VectorizationFactor") @@ -209,11 +209,11 @@ static bool readLocationInfo(LocationInfoTy &LocationInfo) { } } - bool HasError = LLVMOptRemarkParserHasError(Parser); + bool HasError = LLVMRemarkParserHasError(Parser); if (HasError) - WithColor::error() << LLVMOptRemarkParserGetErrorMessage(Parser) << "\n"; + WithColor::error() << LLVMRemarkParserGetErrorMessage(Parser) << "\n"; - LLVMOptRemarkParserDispose(Parser); + LLVMRemarkParserDispose(Parser); return !HasError; } |