summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-06-24 23:48:00 +0000
committerGreg Clayton <gclayton@apple.com>2016-06-24 23:48:00 +0000
commitd7f71add86c892ced324fc26cb0945911f3e26a5 (patch)
tree9ed27eb7686df44798786a1e5b80a0d9ec5c2e7f /lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
parent4d32eb6939d77f8059683c008bb807167110e930 (diff)
downloadbcm5719-llvm-d7f71add86c892ced324fc26cb0945911f3e26a5.tar.gz
bcm5719-llvm-d7f71add86c892ced324fc26cb0945911f3e26a5.zip
Made templates that have Enumeration values as arguments work correctly.
We were checking for integer types only before this. So I added the ability for CompilerType objects to check for integer and enum types. Then I searched for places that were using the CompilerType::IsIntegerType(...) function. Many of these places also wanted to be checking for enumeration types as well, so I have fixed those places. These are in the ABI plug-ins where we are figuring out which arguments would go in where in regisers/stack when making a function call, or determining where the return value would live. The real fix for this is to use clang to compiler a CGFunctionInfo and then modify the code to be able to take the IR and a calling convention and have the backend answer the questions correctly for us so we don't need to create a really bad copy of the ABI in each plug-in, but that is beyond the scope of this bug fix. Also added a test case to ensure this doesn't regress in the future. llvm-svn: 273750
Diffstat (limited to 'lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp')
-rw-r--r--lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
index 52df7d97117..d6b57f9f393 100644
--- a/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
+++ b/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
@@ -322,7 +322,7 @@ ABISysV_mips::SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObje
RegisterContext *reg_ctx = thread->GetRegisterContext().get();
bool set_it_simple = false;
- if (compiler_type.IsIntegerType (is_signed) || compiler_type.IsPointerType())
+ if (compiler_type.IsIntegerOrEnumerationType (is_signed) || compiler_type.IsPointerType())
{
DataExtractor data;
Error data_error;
@@ -414,7 +414,7 @@ ABISysV_mips::GetReturnValueObjectImpl (Thread &thread, CompilerType &return_com
// In MIPS register "r2" (v0) holds the integer function return values
const RegisterInfo *r2_reg_info = reg_ctx->GetRegisterInfoByName("r2", 0);
size_t bit_width = return_compiler_type.GetBitSize(&thread);
- if (return_compiler_type.IsIntegerType (is_signed))
+ if (return_compiler_type.IsIntegerOrEnumerationType (is_signed))
{
switch (bit_width)
{
OpenPOWER on IntegriCloud