Spew symbolic types!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-20 18:23:14 +00:00
parent 143df9a1bb
commit adbc0b5287
3 changed files with 24 additions and 9 deletions

View File

@ -17,11 +17,12 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/Linker.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
#include "llvm/DerivedTypes.h"
#include "llvm/iOther.h"
#include "llvm/Constants.h"
#include "llvm/Assembly/Writer.h"
namespace llvm {
@ -239,7 +240,11 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
const Type *T1 = cast<Type>(VM.find(Name)->second);
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
std::cerr << "WARNING: Type conflict between types named '" << Name
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
<< "'.\n Src='";
WriteTypeSymbolic(std::cerr, T1, Src);
std::cerr << "'.\n Dest='";
WriteTypeSymbolic(std::cerr, T2, Dest);
std::cerr << "'\n";
// Remove the symbol name from the destination.
DelayedTypesToResolve.pop_back();

View File

@ -17,11 +17,12 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/Linker.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
#include "llvm/DerivedTypes.h"
#include "llvm/iOther.h"
#include "llvm/Constants.h"
#include "llvm/Assembly/Writer.h"
namespace llvm {
@ -239,7 +240,11 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
const Type *T1 = cast<Type>(VM.find(Name)->second);
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
std::cerr << "WARNING: Type conflict between types named '" << Name
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
<< "'.\n Src='";
WriteTypeSymbolic(std::cerr, T1, Src);
std::cerr << "'.\n Dest='";
WriteTypeSymbolic(std::cerr, T2, Dest);
std::cerr << "'\n";
// Remove the symbol name from the destination.
DelayedTypesToResolve.pop_back();

View File

@ -17,11 +17,12 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/Linker.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
#include "llvm/DerivedTypes.h"
#include "llvm/iOther.h"
#include "llvm/Constants.h"
#include "llvm/Assembly/Writer.h"
namespace llvm {
@ -239,7 +240,11 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
const Type *T1 = cast<Type>(VM.find(Name)->second);
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
std::cerr << "WARNING: Type conflict between types named '" << Name
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
<< "'.\n Src='";
WriteTypeSymbolic(std::cerr, T1, Src);
std::cerr << "'.\n Dest='";
WriteTypeSymbolic(std::cerr, T2, Dest);
std::cerr << "'\n";
// Remove the symbol name from the destination.
DelayedTypesToResolve.pop_back();