Skip to content

Commit

Permalink
Revert r177543: Add timing of the IR parsing code with a new
Browse files Browse the repository at this point in the history
-time-ir-parsing flag

This breaks the layering of the Support library. We can't add an
implementation side to IRReader because it refers directly to entities
only accessible as part of the IR, AsmParser, and BitcodeReader
libraries. It can only be used in a context where all of those libraries
will be available.

We'll need to find some other way to get this functionality, and
hopefully solve the long-standing layering problem of IRReader.h...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177695 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Mar 22, 2013
1 parent d3107fb commit f0b0f1f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions include/llvm/Support/IRReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/system_error.h"
#include "llvm/Support/Timer.h"

namespace llvm {

Expand Down Expand Up @@ -70,19 +69,13 @@ namespace llvm {
return getLazyIRModule(File.take(), Err, Context);
}

extern const char *TimeIRParsingGroupName;
extern const char *TimeIRParsingName;
extern bool TimeIRParsingIsEnabled;

/// If the given MemoryBuffer holds a bitcode image, return a Module
/// for it. Otherwise, attempt to parse it as LLVM Assembly and return
/// a Module for it. This function *always* takes ownership of the given
/// MemoryBuffer.
inline Module *ParseIR(MemoryBuffer *Buffer,
SMDiagnostic &Err,
LLVMContext &Context) {
NamedRegionTimer T(TimeIRParsingName, TimeIRParsingGroupName,
TimeIRParsingIsEnabled);
if (isBitcode((const unsigned char *)Buffer->getBufferStart(),
(const unsigned char *)Buffer->getBufferEnd())) {
std::string ErrMsg;
Expand Down
1 change: 0 additions & 1 deletion lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_llvm_library(LLVMSupport
IntEqClasses.cpp
IntervalMap.cpp
IntrusiveRefCntPtr.cpp
IRReader.cpp
IsInf.cpp
IsNAN.cpp
Locale.cpp
Expand Down
21 changes: 0 additions & 21 deletions lib/Support/IRReader.cpp

This file was deleted.

0 comments on commit f0b0f1f

Please sign in to comment.