Files
intel-graphics-compiler/IGC/WrapperLLVM/include/llvmWrapper/IR/Constants.h
lgotszal cb6c3f8bed update CopyrightHeaders in IGC
update CopyrightHeaders in IGC
2021-11-29 14:22:02 +01:00

37 lines
715 B
C++

/*========================== begin_copyright_notice ============================
Copyright (C) 2021 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
#ifndef IGCLLVM_IR_CONSTANTS_H
#define IGCLLVM_IR_CONSTANTS_H
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Constants.h"
#if LLVM_VERSION_MAJOR > 12
#include "llvm/Support/TypeSize.h"
#endif
namespace IGCLLVM
{
inline
#if LLVM_VERSION_MAJOR <= 12
unsigned
#else
llvm::ElementCount
#endif
getElementCount(const llvm::ConstantAggregateZero &C) {
#if LLVM_VERSION_MAJOR <= 12
return C.getNumElements();
#else
return C.getElementCount();
#endif
}
}
#endif