aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/AVR/AVR.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/AVR/AVR.h')
-rw-r--r--lib/Target/AVR/AVR.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/AVR/AVR.h b/lib/Target/AVR/AVR.h
index 2535b63dccdd..48327fd377b2 100644
--- a/lib/Target/AVR/AVR.h
+++ b/lib/Target/AVR/AVR.h
@@ -37,8 +37,10 @@ void initializeAVRRelaxMemPass(PassRegistry&);
/// Contains the AVR backend.
namespace AVR {
+/// An integer that identifies all of the supported AVR address spaces.
enum AddressSpace { DataMemory, ProgramMemory };
+/// Checks if a given type is a pointer to program memory.
template <typename T> bool isProgramMemoryAddress(T *V) {
return cast<PointerType>(V->getType())->getAddressSpace() == ProgramMemory;
}