summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-22 22:00:54 +0000
committerChris Lattner <sabre@nondot.org>2003-05-22 22:00:54 +0000
commit84d0ed920dc277b79000c896962f752e42470af3 (patch)
tree0b74abcc7d9aa78d08672013e4d85460ca2fc330 /llvm
parent8d0a71aff8d6fe8f36a9eb4d1f9ae6fcd08af726 (diff)
downloadbcm5719-llvm-84d0ed920dc277b79000c896962f752e42470af3.tar.gz
bcm5719-llvm-84d0ed920dc277b79000c896962f752e42470af3.zip
Remove long dead code
llvm-svn: 6307
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/NameMangling.h27
-rw-r--r--llvm/support/lib/Support/NameMangling.cpp46
2 files changed, 0 insertions, 73 deletions
diff --git a/llvm/include/llvm/Support/NameMangling.h b/llvm/include/llvm/Support/NameMangling.h
deleted file mode 100644
index 8d33dcc4355..00000000000
--- a/llvm/include/llvm/Support/NameMangling.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//===- llvm/Support/NameMangling.h - Name Mangling for LLVM ------*- C++ -*--=//
-//
-// This file implements a consistent scheme for name mangling symbols.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_NAMEMANGLING_H
-#define LLVM_SUPPORT_NAMEMANGLING_H
-
-#include <string>
-class Type;
-class Value;
-
-// MangleTypeName - Implement a consistent name-mangling scheme for
-// a given type.
-//
-std::string MangleTypeName(const Type *type);
-
-// MangleName - implement a consistent name-mangling scheme for all
-// externally visible (i.e., global) objects.
-//
-// privateName should be unique within the module.
-//
-std::string MangleName(const std::string &privateName, const Value *V);
-
-#endif
-
diff --git a/llvm/support/lib/Support/NameMangling.cpp b/llvm/support/lib/Support/NameMangling.cpp
deleted file mode 100644
index e2c0c465070..00000000000
--- a/llvm/support/lib/Support/NameMangling.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//===- NameMangling.cpp - Name Mangling for LLVM ----------------------------=//
-//
-// This file implements a consistent scheme for name mangling symbols.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/NameMangling.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/GlobalValue.h"
-
-// MangleTypeName - Implement a consistent name-mangling scheme for
-// a given type.
-//
-std::string MangleTypeName(const Type *Ty) {
- std::string mangledName;
- if (Ty->isPrimitiveType()) {
- const std::string &longName = Ty->getDescription();
- return std::string(longName.c_str(), (longName.length() < 2) ? 1 : 2);
- } else if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
- mangledName = std::string("P_" + MangleTypeName(PTy->getElementType()));
- } else if (const StructType *STy = dyn_cast<StructType>(Ty)) {
- mangledName = std::string("S_");
- for (unsigned i=0; i < STy->getNumContainedTypes(); ++i)
- mangledName += MangleTypeName(STy->getContainedType(i));
- } else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
- mangledName = std::string("A_" +MangleTypeName(ATy->getElementType()));
- } else if (const FunctionType *FTy = dyn_cast<FunctionType>(Ty)) {
- mangledName = std::string("M_") + MangleTypeName(FTy->getReturnType());
- for (unsigned i = 1; i < FTy->getNumContainedTypes(); ++i)
- mangledName += std::string(MangleTypeName(FTy->getContainedType(i)));
- }
-
- return mangledName;
-}
-
-// mangleName - implement a consistent name-mangling scheme for all
-// externally visible (i.e., global) objects.
-// privateName should be unique within the module.
-//
-std::string MangleName(const std::string &privateName, const Value *V) {
- // Lets drop the P_ before every global name since all globals are ptrs
- return privateName + "_" +
- MangleTypeName(isa<GlobalValue>(V)
- ? cast<GlobalValue>(V)->getType()->getElementType()
- : V->getType());
-}
OpenPOWER on IntegriCloud