mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-11 23:25:15 +00:00
For PR780:
1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8884060a25
commit
7107c3badf
@ -31,7 +31,7 @@
|
|||||||
#define LLVM_ANALYSIS_ALIAS_ANALYSIS_H
|
#define LLVM_ANALYSIS_ALIAS_ANALYSIS_H
|
||||||
|
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define LLVM_INLINEASM_H
|
#define LLVM_INLINEASM_H
|
||||||
|
|
||||||
#include "llvm/Value.h"
|
#include "llvm/Value.h"
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/Intrinsics.h"
|
#include "llvm/Intrinsics.h"
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
/// IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic
|
/// IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic
|
||||||
|
@ -16,13 +16,19 @@
|
|||||||
#ifndef LLVM_LINKALLVMCORE_H
|
#ifndef LLVM_LINKALLVMCORE_H
|
||||||
#define LLVM_LINKALLVMCORE_H
|
#define LLVM_LINKALLVMCORE_H
|
||||||
|
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
#include "llvm/Support/Mangler.h"
|
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/IntrinsicInst.h"
|
#include "llvm/IntrinsicInst.h"
|
||||||
#include "llvm/InlineAsm.h"
|
#include "llvm/InlineAsm.h"
|
||||||
#include "llvm/Analysis/Verifier.h"
|
#include "llvm/Analysis/Verifier.h"
|
||||||
|
#include "llvm/System/Memory.h"
|
||||||
|
#include "llvm/System/Mutex.h"
|
||||||
|
#include "llvm/Support/Dwarf.h"
|
||||||
|
#include "llvm/Support/Mangler.h"
|
||||||
|
#include "llvm/Support/MathExtras.h"
|
||||||
|
#include "llvm/Support/SlowOperationInformer.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct ForceVMCoreLinking {
|
struct ForceVMCoreLinking {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef LLVM_PASS_SUPPORT_H
|
#ifndef LLVM_PASS_SUPPORT_H
|
||||||
#define LLVM_PASS_SUPPORT_H
|
#define LLVM_PASS_SUPPORT_H
|
||||||
|
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
// No need to include Pass.h, we are being included by it!
|
// No need to include Pass.h, we are being included by it!
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#ifndef LLVM_SUPPORT_DWARF_H
|
#ifndef LLVM_SUPPORT_DWARF_H
|
||||||
#define LLVM_SUPPORT_DWARF_H
|
#define LLVM_SUPPORT_DWARF_H
|
||||||
|
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
namespace dwarf {
|
namespace dwarf {
|
||||||
@ -546,4 +548,6 @@ const char *CallFrameString(unsigned Encoding);
|
|||||||
|
|
||||||
} // End of namespace llvm
|
} // End of namespace llvm
|
||||||
|
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SupportDwarf)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
//===- llvm/Support/IncludeFile.h - Ensure Linking Of Library ---*- C++ -*-===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file was developed by Reid Spencer and is distributed under the
|
|
||||||
// University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
//
|
|
||||||
// This file defines the FORCE_DEFINING_FILE_TO_BE_LINKED and DEFINE_FILE_FOR
|
|
||||||
// macros.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#ifndef LLVM_SUPPORT_INCLUDEFILE_H
|
|
||||||
#define LLVM_SUPPORT_INCLUDEFILE_H
|
|
||||||
|
|
||||||
/// This macro is the public interface that IncludeFile.h exports. This gives
|
|
||||||
/// us the option to implement the "link the definition" capability in any
|
|
||||||
/// manner that we choose. All header files that depend on a specific .cpp
|
|
||||||
/// file being linked at run time should use this macro instead of the
|
|
||||||
/// IncludeFile class directly.
|
|
||||||
///
|
|
||||||
/// For example, foo.h would use:<br/>
|
|
||||||
/// <tt>FORCE_DEFINING_FILE_TO_BE_LINKED(foo)</tt><br/>
|
|
||||||
///
|
|
||||||
/// And, foo.cp would use:<br/>
|
|
||||||
/// <tt>DEFINING_FILE_FOR(foo)</tt><br/>
|
|
||||||
#define FORCE_DEFINING_FILE_TO_BE_LINKED(name) \
|
|
||||||
namespace llvm { \
|
|
||||||
extern char name ## LinkVar; \
|
|
||||||
static IncludeFile name ## LinkObj ( &name ## LinkVar ); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This macro is the counterpart to FORCE_DEFINING_FILE_TO_BE_LINKED. It should
|
|
||||||
/// be used in a .cpp file to define the name referenced in a header file that
|
|
||||||
/// will cause linkage of the .cpp file. It should only be used at extern level.
|
|
||||||
#define DEFINING_FILE_FOR(name) namespace llvm { char name ## LinkVar; }
|
|
||||||
|
|
||||||
namespace llvm {
|
|
||||||
|
|
||||||
/// This class is used in the implementation of FORCE_DEFINING_FILE_TO_BE_LINKED
|
|
||||||
/// macro to make sure that the implementation of a header file is included
|
|
||||||
/// into a tool that uses the header. This is solely
|
|
||||||
/// to overcome problems linking .a files and not getting the implementation
|
|
||||||
/// of compilation units we need. This is commonly an issue with the various
|
|
||||||
/// Passes but also occurs elsewhere in LLVM. We like to use .a files because
|
|
||||||
/// they link faster and provide the smallest executables. However, sometimes
|
|
||||||
/// those executables are too small, if the program doesn't reference something
|
|
||||||
/// that might be needed, especially by a loaded share object. This little class
|
|
||||||
/// helps to resolve that problem. The basic strategy is to use this class in
|
|
||||||
/// a header file and pass the address of a variable to the constructor. If the
|
|
||||||
/// variable is defined in the header file's corresponding .cpp file then all
|
|
||||||
/// tools/libraries that #include the header file will require the .cpp as well.
|
|
||||||
/// For example:<br/>
|
|
||||||
/// <tt>extern int LinkMyCodeStub;</tt><br/>
|
|
||||||
/// <tt>static IncludeFile LinkMyModule(&LinkMyCodeStub);</tt><br/>
|
|
||||||
/// @brief Class to ensure linking of corresponding object file.
|
|
||||||
struct IncludeFile {
|
|
||||||
IncludeFile(void *);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_MANGLER_H
|
#ifndef LLVM_SUPPORT_MANGLER_H
|
||||||
#define LLVM_SUPPORT_MANGLER_H
|
#define LLVM_SUPPORT_MANGLER_H
|
||||||
|
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#define LLVM_SUPPORT_MATHEXTRAS_H
|
#define LLVM_SUPPORT_MATHEXTRAS_H
|
||||||
|
|
||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -306,4 +307,7 @@ int IsInf (double d);
|
|||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsInf)
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsNAN)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class SlowOperationInformer {
|
class SlowOperationInformer {
|
||||||
@ -63,3 +64,5 @@ namespace llvm {
|
|||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
#endif /* SLOW_OPERATION_INFORMER_H */
|
#endif /* SLOW_OPERATION_INFORMER_H */
|
||||||
|
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SupportSlowOperationInformer)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===- llvm/Support/IncludeFile.h - Ensure Linking Of Library ---*- C++ -*-===//
|
//===- llvm/System/IncludeFile.h - Ensure Linking Of Library ---*- C++ -*-===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
@ -12,8 +12,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_SUPPORT_INCLUDEFILE_H
|
#ifndef LLVM_SYSTEM_INCLUDEFILE_H
|
||||||
#define LLVM_SUPPORT_INCLUDEFILE_H
|
#define LLVM_SYSTEM_INCLUDEFILE_H
|
||||||
|
|
||||||
/// This macro is the public interface that IncludeFile.h exports. This gives
|
/// This macro is the public interface that IncludeFile.h exports. This gives
|
||||||
/// us the option to implement the "link the definition" capability in any
|
/// us the option to implement the "link the definition" capability in any
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#define LLVM_SYSTEM_MEMORY_H
|
#define LLVM_SYSTEM_MEMORY_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace sys {
|
namespace sys {
|
||||||
@ -70,4 +71,6 @@ namespace sys {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMemory)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
#ifndef LLVM_SYSTEM_MUTEX_H
|
#ifndef LLVM_SYSTEM_MUTEX_H
|
||||||
#define LLVM_SYSTEM_MUTEX_H
|
#define LLVM_SYSTEM_MUTEX_H
|
||||||
|
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm
|
namespace llvm
|
||||||
{
|
{
|
||||||
namespace sys
|
namespace sys
|
||||||
@ -81,4 +83,6 @@ namespace llvm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMutex)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,5 +10,6 @@ LEVEL = ../../..
|
|||||||
LIBRARYNAME = LLVMSelectionDAG
|
LIBRARYNAME = LLVMSelectionDAG
|
||||||
PARALLEL_DIRS =
|
PARALLEL_DIRS =
|
||||||
BUILD_ARCHIVE = 1
|
BUILD_ARCHIVE = 1
|
||||||
|
DONT_BUILD_RELINKED = 1
|
||||||
|
|
||||||
include $(LEVEL)/Makefile.common
|
include $(LEVEL)/Makefile.common
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Support/Dwarf.h"
|
#include "llvm/Support/Dwarf.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
@ -580,3 +581,5 @@ const char *CallFrameString(unsigned Encoding) {
|
|||||||
} // End of namespace dwarf.
|
} // End of namespace dwarf.
|
||||||
|
|
||||||
} // End of namespace llvm.
|
} // End of namespace llvm.
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SupportDwarf)
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
//===- lib/Support/IncludeFile.cpp - Ensure Linking Of Implementation -----===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file was developed by Reid Spencer and is distributed under the
|
|
||||||
// University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
//
|
|
||||||
// This file implements the IncludeFile constructor.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#include "llvm/Support/IncludeFile.h"
|
|
||||||
|
|
||||||
using namespace llvm;
|
|
||||||
|
|
||||||
// This constructor is used to ensure linking of other modules. See the
|
|
||||||
// llvm/Support/IncludeFile.h header for details.
|
|
||||||
IncludeFile::IncludeFile(void*) {}
|
|
@ -8,6 +8,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Config/config.h"
|
#include "llvm/Config/config.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
#if HAVE_ISINF_IN_MATH_H
|
#if HAVE_ISINF_IN_MATH_H
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
@ -43,3 +44,5 @@ int IsInf (float f) { return isinf (f); }
|
|||||||
int IsInf (double d) { return isinf (d); }
|
int IsInf (double d) { return isinf (d); }
|
||||||
|
|
||||||
} // end namespace llvm;
|
} // end namespace llvm;
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SupportIsInf)
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Config/config.h"
|
#include "llvm/Config/config.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
#if HAVE_ISNAN_IN_MATH_H
|
#if HAVE_ISNAN_IN_MATH_H
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
#elif HAVE_ISNAN_IN_CMATH
|
#elif HAVE_ISNAN_IN_CMATH
|
||||||
@ -32,3 +34,5 @@ int IsNAN (float f) { return isnan (f); }
|
|||||||
int IsNAN (double d) { return isnan (d); }
|
int IsNAN (double d) { return isnan (d); }
|
||||||
|
|
||||||
} // end namespace llvm;
|
} // end namespace llvm;
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SupportIsNAN)
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Support/SlowOperationInformer.h"
|
#include "llvm/Support/SlowOperationInformer.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
#include "llvm/System/Alarm.h"
|
#include "llvm/System/Alarm.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -64,3 +65,5 @@ bool SlowOperationInformer::progress(unsigned Amount) {
|
|||||||
std::cout << ToPrint+OS.str() << std::flush;
|
std::cout << ToPrint+OS.str() << std::flush;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SupportSlowOperationInformer)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===- lib/Support/IncludeFile.cpp - Ensure Linking Of Implementation -----===//
|
//===- lib/System/IncludeFile.cpp - Ensure Linking Of Implementation -----===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
@ -11,10 +11,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Support/IncludeFile.h"
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
// This constructor is used to ensure linking of other modules. See the
|
// This constructor is used to ensure linking of other modules. See the
|
||||||
// llvm/Support/IncludeFile.h header for details.
|
// llvm/System/IncludeFile.h header for details.
|
||||||
IncludeFile::IncludeFile(void*) {}
|
IncludeFile::IncludeFile(void*) {}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "llvm/System/Memory.h"
|
#include "llvm/System/Memory.h"
|
||||||
#include "llvm/Config/config.h"
|
#include "llvm/Config/config.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
using namespace sys;
|
using namespace sys;
|
||||||
@ -33,3 +34,4 @@ using namespace sys;
|
|||||||
#include "Win32/Memory.inc"
|
#include "Win32/Memory.inc"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SystemMemory)
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "llvm/Config/config.h"
|
#include "llvm/Config/config.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/System/Mutex.h"
|
||||||
|
#include "llvm/System/IncludeFile.h"
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//=== WARNING: Implementation here must contain only TRULY operating system
|
//=== WARNING: Implementation here must contain only TRULY operating system
|
||||||
@ -157,3 +158,5 @@ Mutex::tryacquire()
|
|||||||
#warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/Mutex.cpp
|
#warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/Mutex.cpp
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEFINING_FILE_FOR(SystemMutex)
|
||||||
|
@ -105,7 +105,7 @@ namespace { // Anonymous namespace for class
|
|||||||
// returning back to the pass manager, or else the pass manager may try to
|
// returning back to the pass manager, or else the pass manager may try to
|
||||||
// run other passes on the broken module.
|
// run other passes on the broken module.
|
||||||
if (RealPass)
|
if (RealPass)
|
||||||
abortIfBroken();
|
return abortIfBroken();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ namespace { // Anonymous namespace for class
|
|||||||
// returning back to the pass manager, or else the pass manager may try to
|
// returning back to the pass manager, or else the pass manager may try to
|
||||||
// run other passes on the broken module.
|
// run other passes on the broken module.
|
||||||
if (RealPass)
|
if (RealPass)
|
||||||
abortIfBroken();
|
return abortIfBroken();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -138,8 +138,7 @@ namespace { // Anonymous namespace for class
|
|||||||
visitGlobalVariable(*I);
|
visitGlobalVariable(*I);
|
||||||
|
|
||||||
// If the module is broken, abort at this time.
|
// If the module is broken, abort at this time.
|
||||||
abortIfBroken();
|
return abortIfBroken();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
@ -151,7 +150,7 @@ namespace { // Anonymous namespace for class
|
|||||||
/// abortIfBroken - If the module is broken and we are supposed to abort on
|
/// abortIfBroken - If the module is broken and we are supposed to abort on
|
||||||
/// this condition, do so.
|
/// this condition, do so.
|
||||||
///
|
///
|
||||||
void abortIfBroken() {
|
bool abortIfBroken() {
|
||||||
if (Broken) {
|
if (Broken) {
|
||||||
msgs << "Broken module found, ";
|
msgs << "Broken module found, ";
|
||||||
switch (action) {
|
switch (action) {
|
||||||
@ -162,11 +161,13 @@ namespace { // Anonymous namespace for class
|
|||||||
case PrintMessageAction:
|
case PrintMessageAction:
|
||||||
msgs << "verification continues.\n";
|
msgs << "verification continues.\n";
|
||||||
std::cerr << msgs.str();
|
std::cerr << msgs.str();
|
||||||
break;
|
return false;
|
||||||
case ReturnStatusAction:
|
case ReturnStatusAction:
|
||||||
break;
|
msgs << "compilation terminated.\n";
|
||||||
|
return Broken;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user