From cf33f833c9c8dd28b44a3177ef0b759e0f46cb86 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 15 May 2018 21:22:31 +0100 Subject: Simplified printFileLine by using std::to_string, and removed unneeded version that takes an argument a stream --- lib/Module/KInstruction.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lib/Module') diff --git a/lib/Module/KInstruction.cpp b/lib/Module/KInstruction.cpp index d1e6c470..c7c841a4 100644 --- a/lib/Module/KInstruction.cpp +++ b/lib/Module/KInstruction.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "klee/Internal/Module/KInstruction.h" -#include "llvm/Support/raw_ostream.h" #include using namespace llvm; @@ -20,15 +19,8 @@ KInstruction::~KInstruction() { delete[] operands; } -void KInstruction::printFileLine(llvm::raw_ostream &debugFile) const { - if (info->file != "") - debugFile << info->file << ":" << info->line; - else debugFile << "[no debug info]"; -} - -std::string KInstruction::printFileLine() const { - std::string str; - llvm::raw_string_ostream oss(str); - printFileLine(oss); - return oss.str(); +std::string KInstruction::getSourceLocation() const { + if (!info->file.empty()) + return info->file + ":" + std::to_string(info->line); + else return "[no debug info]"; } -- cgit 1.4.1