From ebb90674be21b46aa2e2308c36a363f1a6f491f8 Mon Sep 17 00:00:00 2001 From: Tapasya Patki Date: Wed, 25 Sep 2024 17:40:39 -0700 Subject: [PATCH] Debugging. --- src/c/weaver/weave/perfflow_weave_common.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/c/weaver/weave/perfflow_weave_common.cpp b/src/c/weaver/weave/perfflow_weave_common.cpp index 38d6d14d..c11691db 100644 --- a/src/c/weaver/weave/perfflow_weave_common.cpp +++ b/src/c/weaver/weave/perfflow_weave_common.cpp @@ -18,7 +18,9 @@ bool WeaveCommon::modifyAnnotatedFunctions(Module &m) { - auto annotations = m.getNamedGlobal("llvm.global.annotations"); + outs() << "I am in modifyAnnotatedFunctions \n"; + + auto annotations = m.getNamedGlobal("llvm.global.annotations"); if (!annotations) { return false; @@ -28,12 +30,14 @@ bool WeaveCommon::modifyAnnotatedFunctions(Module &m) if (annotations.getNumOperands() > 0) { - outs() << "I have %d operands!" << annotations.getNumOperands() << "\n"; + outs() << "I have %d operands!" << annotations.getNumOperands() << "\n"; auto a = cast (annotations->getOperand(0)); } else + { + outs() << "I have failed as there are no operands!\n"; return changed; - + } for (unsigned int i = 0; i < a->getNumOperands(); i++) {