summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/CodeGen/FEntryInserter.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
committerpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
commitbdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch)
treec50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/CodeGen/FEntryInserter.cpp
parentPrint a 'p' flag for file descriptors that were opened after pledge(2). (diff)
downloadwireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz
wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/CodeGen/FEntryInserter.cpp')
-rw-r--r--gnu/llvm/lib/CodeGen/FEntryInserter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/gnu/llvm/lib/CodeGen/FEntryInserter.cpp b/gnu/llvm/lib/CodeGen/FEntryInserter.cpp
index 0759bf6713e..4ddf9f92836 100644
--- a/gnu/llvm/lib/CodeGen/FEntryInserter.cpp
+++ b/gnu/llvm/lib/CodeGen/FEntryInserter.cpp
@@ -15,11 +15,11 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/Passes.h"
+#include "llvm/CodeGen/TargetFrameLowering.h"
+#include "llvm/CodeGen/TargetInstrInfo.h"
+#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
-#include "llvm/Target/TargetFrameLowering.h"
-#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
@@ -36,15 +36,13 @@ struct FEntryInserter : public MachineFunctionPass {
bool FEntryInserter::runOnMachineFunction(MachineFunction &MF) {
const std::string FEntryName =
- MF.getFunction()->getFnAttribute("fentry-call").getValueAsString();
+ MF.getFunction().getFnAttribute("fentry-call").getValueAsString();
if (FEntryName != "true")
return false;
auto &FirstMBB = *MF.begin();
- auto &FirstMI = *FirstMBB.begin();
-
auto *TII = MF.getSubtarget().getInstrInfo();
- BuildMI(FirstMBB, FirstMI, FirstMI.getDebugLoc(),
+ BuildMI(FirstMBB, FirstMBB.begin(), DebugLoc(),
TII->get(TargetOpcode::FENTRY_CALL));
return true;
}