diff options
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 375be2a2204..93a29fde996 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -428,7 +428,7 @@ std::string GCOVProfiler::mangleName(const DICompileUnit *CU, bool ThreeElement = N->getNumOperands() == 3; if (!ThreeElement && N->getNumOperands() != 2) continue; - if (N->getOperand(ThreeElement ? 2 : 1) != CU) + if (dyn_cast<MDNode>(N->getOperand(ThreeElement ? 2 : 1)) != CU) continue; if (ThreeElement) { |