mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Remove useless Tag enumeration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123623 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dcb98cbe7
commit
0d1941a46f
@ -25,9 +25,7 @@
|
|||||||
#ifndef LLVM_USE_H
|
#ifndef LLVM_USE_H
|
||||||
#define LLVM_USE_H
|
#define LLVM_USE_H
|
||||||
|
|
||||||
#include "llvm/Support/Casting.h"
|
|
||||||
#include "llvm/ADT/PointerIntPair.h"
|
#include "llvm/ADT/PointerIntPair.h"
|
||||||
#include <cstddef>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -36,9 +34,6 @@ class Value;
|
|||||||
class User;
|
class User;
|
||||||
class Use;
|
class Use;
|
||||||
|
|
||||||
/// Tag - generic tag type for (at least 32 bit) pointers
|
|
||||||
enum Tag { noTag, tagOne, tagTwo, tagThree };
|
|
||||||
|
|
||||||
// Use** is only 4-byte aligned.
|
// Use** is only 4-byte aligned.
|
||||||
template<>
|
template<>
|
||||||
class PointerLikeTypeTraits<Use**> {
|
class PointerLikeTypeTraits<Use**> {
|
||||||
@ -71,10 +66,10 @@ private:
|
|||||||
if (Val) removeFromList();
|
if (Val) removeFromList();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PrevPtrTag { zeroDigitTag = noTag
|
enum PrevPtrTag { zeroDigitTag
|
||||||
, oneDigitTag = tagOne
|
, oneDigitTag
|
||||||
, stopTag = tagTwo
|
, stopTag
|
||||||
, fullStopTag = tagThree };
|
, fullStopTag };
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
Use(PrevPtrTag tag) : Val(0) {
|
Use(PrevPtrTag tag) : Val(0) {
|
||||||
@ -215,7 +210,7 @@ public:
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
struct AugmentedUse : public Use {
|
struct AugmentedUse : public Use {
|
||||||
PointerIntPair<User*, 1, Tag> ref;
|
PointerIntPair<User*, 1, unsigned> ref;
|
||||||
AugmentedUse(); // not implemented
|
AugmentedUse(); // not implemented
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -135,8 +135,8 @@ void Use::zap(Use *Start, const Use *Stop, bool del) {
|
|||||||
|
|
||||||
User *Use::getUser() const {
|
User *Use::getUser() const {
|
||||||
const Use *End = getImpliedUser();
|
const Use *End = getImpliedUser();
|
||||||
const PointerIntPair<User*, 1, Tag>& ref(
|
const PointerIntPair<User*, 1, unsigned>&
|
||||||
static_cast<const AugmentedUse*>(End - 1)->ref);
|
ref(static_cast<const AugmentedUse*>(End - 1)->ref);
|
||||||
User *She = ref.getPointer();
|
User *She = ref.getPointer();
|
||||||
return ref.getInt()
|
return ref.getInt()
|
||||||
? She
|
? She
|
||||||
|
@ -44,9 +44,10 @@ Use *User::allocHungoffUses(unsigned N) const {
|
|||||||
+ sizeof(AugmentedUse)
|
+ sizeof(AugmentedUse)
|
||||||
- sizeof(Use)));
|
- sizeof(Use)));
|
||||||
Use *End = Begin + N;
|
Use *End = Begin + N;
|
||||||
PointerIntPair<User*, 1, Tag>& ref(static_cast<AugmentedUse&>(End[-1]).ref);
|
PointerIntPair<User*, 1, unsigned>&
|
||||||
|
ref(static_cast<AugmentedUse&>(End[-1]).ref);
|
||||||
ref.setPointer(const_cast<User*>(this));
|
ref.setPointer(const_cast<User*>(this));
|
||||||
ref.setInt(tagOne);
|
ref.setInt(1);
|
||||||
return Use::initTags(Begin, End);
|
return Use::initTags(Begin, End);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user