Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
ghx-label-5
Description
There are a large number of places in the backend where we import everything from the llvm namespace into the global namespace. There's a lot of things in the llvm namespace, and it changes from version-to-version (e.g. they have llvm::make_unique). Instead of importing everything we should either import them selectively (e.g. using llvm::Function or just use the llvm:: prefix.
$ git grep 'using namespace lvm' be/src/benchmarks/hash-benchmark.cc:using namespace llvm; be/src/codegen/codegen-anyval.cc:using namespace llvm; be/src/codegen/codegen-callgraph.cc:using namespace llvm; be/src/codegen/codegen-symbol-emitter.cc:using namespace llvm; be/src/codegen/codegen-symbol-emitter.cc:using namespace llvm::object; be/src/codegen/codegen-util.cc:using namespace llvm; be/src/codegen/instruction-counter-test.cc:using namespace llvm; be/src/codegen/instruction-counter.cc:using namespace llvm; be/src/codegen/llvm-codegen-test.cc:using namespace llvm; be/src/codegen/llvm-codegen.cc:using namespace llvm; be/src/exec/blocking-join-node.cc:using namespace llvm; be/src/exec/exec-node.cc:using namespace llvm; be/src/exec/filter-context.cc:using namespace llvm; be/src/exec/hdfs-avro-scanner.cc:using namespace llvm; be/src/exec/hdfs-parquet-scanner.cc:using namespace llvm; be/src/exec/hdfs-scan-node-base.cc:using namespace llvm; be/src/exec/hdfs-scanner.cc:using namespace llvm; be/src/exec/hdfs-sequence-scanner.cc:using namespace llvm; be/src/exec/hdfs-text-scanner.cc:using namespace llvm; be/src/exec/partitioned-aggregation-node.cc:using namespace llvm; be/src/exec/text-converter.cc:using namespace llvm; be/src/exec/topn-node.cc:using namespace llvm; be/src/exec/union-node.cc:using namespace llvm; be/src/exprs/agg-fn-evaluator.cc:using namespace llvm; be/src/exprs/agg-fn.cc:using namespace llvm; be/src/exprs/case-expr.cc:using namespace llvm; be/src/exprs/compound-predicates.cc:using namespace llvm; be/src/exprs/expr-codegen-test.cc:using namespace llvm; be/src/exprs/expr-test.cc:using namespace llvm; be/src/exprs/literal.cc:using namespace llvm; be/src/exprs/null-literal.cc:using namespace llvm; be/src/exprs/scalar-expr.cc:using namespace llvm; be/src/exprs/slot-ref.cc:using namespace llvm; be/src/runtime/runtime-state.cc:using namespace llvm; be/src/runtime/tuple.cc:using namespace llvm; be/src/runtime/types.cc:using namespace llvm; be/src/util/tuple-row-compare.cc:using namespace llvm;