summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/StripDebugInfo.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-02-28 14:50:42 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:50:44 -0700
commited5fe2098be12d839cb4384e59a93f15f6f42e58 (patch)
treecf8d1cce87c0aff6af00fd90f0f42ff9f44e3212 /mlir/lib/Transforms/StripDebugInfo.cpp
parent58889884a254894342b589309064782be64c3afd (diff)
downloadbcm5719-llvm-ed5fe2098be12d839cb4384e59a93f15f6f42e58.tar.gz
bcm5719-llvm-ed5fe2098be12d839cb4384e59a93f15f6f42e58.zip
Remove PassResult and have the runOnFunction/runOnModule functions return void instead. To signal a pass failure, passes should now invoke the 'signalPassFailure' method. This provides the equivalent functionality when needed, but isn't an intrusive part of the API like PassResult.
PiperOrigin-RevId: 236202029
Diffstat (limited to 'mlir/lib/Transforms/StripDebugInfo.cpp')
-rw-r--r--mlir/lib/Transforms/StripDebugInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp
index 0f1ba02174b..47244f94ac9 100644
--- a/mlir/lib/Transforms/StripDebugInfo.cpp
+++ b/mlir/lib/Transforms/StripDebugInfo.cpp
@@ -24,18 +24,17 @@ using namespace mlir;
namespace {
struct StripDebugInfo : public FunctionPass<StripDebugInfo> {
- PassResult runOnFunction() override;
+ void runOnFunction() override;
};
} // end anonymous namespace
-PassResult StripDebugInfo::runOnFunction() {
+void StripDebugInfo::runOnFunction() {
Function &func = getFunction();
UnknownLoc unknownLoc = UnknownLoc::get(func.getContext());
// Strip the debug info from the function and its instructions.
func.setLoc(unknownLoc);
func.walk([&](Instruction *inst) { inst->setLoc(unknownLoc); });
- return success();
}
/// Creates a pass to strip debug information from a function.
OpenPOWER on IntegriCloud