Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/llvm
diff options
context:
space:
mode:
authorImran Hameed <imhameed@microsoft.com>2019-10-26 00:32:55 +0300
committerImran Hameed <imhameed@microsoft.com>2021-06-03 00:03:13 +0300
commit2da1703f0c3cf207d2addb81f123ea05763d5b0f (patch)
tree99dd6b891759ef391ddb0036b6cc1dd57bfcdbc5 /llvm
parentc9d3cd78413d29453a267b3f66136be51e67f181 (diff)
Add a flag to disable emission of .llvm_faultmaps metadata.
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/FaultMaps.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/FaultMaps.cpp b/llvm/lib/CodeGen/FaultMaps.cpp
index 23560b4cd136..066a580645b1 100644
--- a/llvm/lib/CodeGen/FaultMaps.cpp
+++ b/llvm/lib/CodeGen/FaultMaps.cpp
@@ -17,9 +17,14 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/CommandLine.h"
using namespace llvm;
+static cl::opt<bool> DisableFaultMaps("disable-fault-maps",
+ cl::desc("Disables emission of fault map metadata."),
+ cl::init(false), cl::Hidden);
+
#define DEBUG_TYPE "faultmaps"
static const int FaultMapVersion = 1;
@@ -45,6 +50,8 @@ void FaultMaps::recordFaultingOp(FaultKind FaultTy,
}
void FaultMaps::serializeToFaultMapSection() {
+ if (DisableFaultMaps)
+ return;
if (FunctionInfos.empty())
return;