This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix build warnings
ClosedPublic

Authored by sunshaoce on Jul 9 2023, 6:56 AM.

Details

Summary
llvm-project/openmp/libomptarget/src/private.h:260:9: warning: 'DEBUG_PREFIX' macro redefined [-Wmacro-redefined]
#define DEBUG_PREFIX GETNAME(TARGET_NAME)
        ^
llvm-project/openmp/libomptarget/include/ompt_device_callbacks.h:22:9: note: previous definition is here
#define DEBUG_PREFIX "OMPT"
        ^
1 warning generated.
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:458:14: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
      return std::move(Err);
             ^
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:458:14: note: remove std::move call here
      return std::move(Err);
             ^~~~~~~~~~   ~
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:552:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move(Err);
           ^
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:552:12: note: remove std::move call here
    return std::move(Err);
           ^~~~~~~~~~   ~
2 warnings generated.

Diff Detail

Event Timeline

sunshaoce created this revision.Jul 9 2023, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2023, 6:56 AM
sunshaoce requested review of this revision.Jul 9 2023, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2023, 6:56 AM
sunshaoce edited the summary of this revision. (Show Details)Jul 9 2023, 6:57 AM
jhuber6 accepted this revision.Jul 9 2023, 6:57 AM
This revision is now accepted and ready to land.Jul 9 2023, 6:57 AM
This revision was automatically updated to reflect the committed changes.