summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvmc2/driver/CompilationGraph.cpp8
-rw-r--r--llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp2
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/llvmc2/driver/CompilationGraph.cpp b/llvm/tools/llvmc2/driver/CompilationGraph.cpp
index 838b9405013..81283babb48 100644
--- a/llvm/tools/llvmc2/driver/CompilationGraph.cpp
+++ b/llvm/tools/llvmc2/driver/CompilationGraph.cpp
@@ -109,12 +109,8 @@ CompilationGraph::getToolsVector(const std::string& LangName) const
}
void CompilationGraph::insertNode(Tool* V) {
- if (NodesMap.count(V->Name()) == 0) {
- Node N;
- N.OwningGraph = this;
- N.ToolPtr = V;
- NodesMap[V->Name()] = N;
- }
+ if (NodesMap.count(V->Name()) == 0)
+ NodesMap[V->Name()] = Node(this, V);
}
void CompilationGraph::insertEdge(const std::string& A, Edge* Edg) {
diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
index a68c0561cea..7836172a44c 100644
--- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
@@ -20,12 +20,14 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Streams.h"
+
#include <algorithm>
#include <cassert>
#include <functional>
#include <stdexcept>
#include <string>
#include <typeinfo>
+
using namespace llvm;
namespace {
OpenPOWER on IntegriCloud