aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 2256cc0..0356952 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -2118,6 +2118,8 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
llvm::Instruction *BrInst = Builder.CreateCondBr(CondV, TrueBlock, FalseBlock,
Weights, Unpredictable);
+ addInstToNewSourceAtom(BrInst, CondV);
+
switch (HLSLControlFlowAttr) {
case HLSLControlFlowHintAttr::Microsoft_branch:
case HLSLControlFlowHintAttr::Microsoft_flatten: {
@@ -3338,3 +3340,11 @@ void CodeGenFunction::addInstToSpecificSourceAtom(
if (CGDebugInfo *DI = getDebugInfo())
DI->addInstToSpecificSourceAtom(KeyInstruction, Backup, Atom);
}
+
+void CodeGenFunction::addInstToNewSourceAtom(llvm::Instruction *KeyInstruction,
+ llvm::Value *Backup) {
+ if (CGDebugInfo *DI = getDebugInfo()) {
+ ApplyAtomGroup Grp(getDebugInfo());
+ DI->addInstToCurrentSourceAtom(KeyInstruction, Backup);
+ }
+} \ No newline at end of file