clover/llvm: Trivial assorted cleanups for invocation.cpp.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 17 May 2016 14:03:02 +0000 (16:03 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 12 Jul 2016 03:34:34 +0000 (20:34 -0700)
Drop a few include and using directives which are no longer necessary.

Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index 1d7b0d34924d73284a62c80d214a5aa91a0f2e0a..23971bb9f9e75adca5e7ed54f50368f5c718ceb7 100644 (file)
 #include "core/compiler.hpp"
 #include "util/algorithm.hpp"
 
-#include <clang/Frontend/CompilerInstance.h>
-#include <clang/Frontend/TextDiagnosticBuffer.h>
-#include <clang/Frontend/TextDiagnosticPrinter.h>
-#include <clang/CodeGen/CodeGenAction.h>
-#include <clang/Basic/TargetInfo.h>
-#include <llvm/Bitcode/BitstreamWriter.h>
-#include <llvm/Bitcode/ReaderWriter.h>
-#include <llvm/Linker/Linker.h>
-#include <llvm/IR/DiagnosticInfo.h>
 #include <llvm/IR/DiagnosticPrinter.h>
-#include <llvm/IR/DerivedTypes.h>
+#include <llvm/IR/DiagnosticInfo.h>
 #include <llvm/IR/LLVMContext.h>
-#include <llvm/IR/Module.h>
-#include <llvm/Support/SourceMgr.h>
-#include <llvm/IRReader/IRReader.h>
-#include <llvm/Support/CodeGen.h>
-#include <llvm/Support/TargetSelect.h>
-#include <llvm/Support/MemoryBuffer.h>
-#include <llvm/Support/FormattedStream.h>
-#include <llvm/Support/TargetRegistry.h>
-#include <llvm/Transforms/IPO.h>
+#include <llvm/Support/raw_ostream.h>
 #include <llvm/Transforms/IPO/PassManagerBuilder.h>
-#include <llvm/Transforms/Utils/Cloning.h>
-
-
-#include <llvm/IR/DataLayout.h>
-#include <llvm/Target/TargetMachine.h>
-#include <llvm/Target/TargetOptions.h>
-
 #include <llvm-c/Target.h>
-#include <llvm-c/TargetMachine.h>
-#include <llvm-c/Core.h>
 
-#include "pipe/p_state.h"
-#include "util/u_memory.h"
-#include "util/u_math.h"
-
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <cstdio>
-#include <sstream>
-#include <libelf.h>
-#include <gelf.h>
+#include <clang/CodeGen/CodeGenAction.h>
+#include <clang/Frontend/TextDiagnosticBuffer.h>
+#include <clang/Frontend/TextDiagnosticPrinter.h>
+#include <clang/Basic/TargetInfo.h>
 
 using namespace clover;
 using namespace clover::llvm;
 
-using ::llvm::cast;
-using ::llvm::dyn_cast;
 using ::llvm::Function;
-using ::llvm::isa;
 using ::llvm::LLVMContext;
 using ::llvm::Module;
 using ::llvm::raw_string_ostream;
-using ::llvm::TargetMachine;
 
 namespace {
-   // XXX - Temporary hack to avoid breaking the build for the moment, will
-   //       get rid of this later.
-   namespace llvm {
-      using namespace ::llvm;
-   }
-
    void
    init_targets() {
       static bool targets_initialized = false;
@@ -249,7 +206,7 @@ namespace {
       pmb.populateModulePassManager(pm);
       pm.run(mod);
    }
-} // End anonymous namespace
+}
 
 module
 clover::compile_program_llvm(const std::string &source,